ext4: fix data=journal fast mount/umount hang
[pandora-kernel.git] / fs / ext4 / fsync.c
index be1d89f..3278e64 100644 (file)
@@ -44,7 +44,6 @@
  */
 static int ext4_sync_parent(struct inode *inode)
 {
-       struct writeback_control wbc;
        struct dentry *dentry = NULL;
        struct inode *next;
        int ret = 0;
@@ -66,10 +65,7 @@ static int ext4_sync_parent(struct inode *inode)
                ret = sync_mapping_buffers(inode->i_mapping);
                if (ret)
                        break;
-               memset(&wbc, 0, sizeof(wbc));
-               wbc.sync_mode = WB_SYNC_ALL;
-               wbc.nr_to_write = 0;         /* only write out the inode */
-               ret = sync_inode(inode, &wbc);
+               ret = sync_inode_metadata(inode, 1);
                if (ret)
                        break;
        }
@@ -113,8 +109,6 @@ static int __sync_inode(struct inode *inode, int datasync)
  *
  * What we do is just kick off a commit and wait on it.  This will snapshot the
  * inode to disk.
- *
- * i_mutex lock is held when entering and exiting this function
  */
 
 int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync)