drop unused dentry argument to ->fsync
[safe/jmp/linux-2.6] / fs / btrfs / file.c
index 54556ca..787b50a 100644 (file)
@@ -888,14 +888,9 @@ static ssize_t btrfs_file_aio_write(struct kiocb *iocb,
        BTRFS_I(inode)->sequence++;
 
        if (unlikely(file->f_flags & O_DIRECT)) {
-               ret = btrfs_delalloc_reserve_space(inode, count);
-               if (ret)
-                       goto out;
-
                num_written = generic_file_direct_write(iocb, iov, &nr_segs,
                                                        pos, ppos, count,
                                                        ocount);
-
                /*
                 * the generic O_DIRECT will update in-memory i_size after the
                 * DIOs are done.  But our endio handlers that update the on
@@ -1106,8 +1101,9 @@ int btrfs_release_file(struct inode *inode, struct file *filp)
  * important optimization for directories because holding the mutex prevents
  * new operations on the dir while we write to disk.
  */
-int btrfs_sync_file(struct file *file, struct dentry *dentry, int datasync)
+int btrfs_sync_file(struct file *file, int datasync)
 {
+       struct dentry *dentry = file->f_path.dentry;
        struct inode *inode = dentry->d_inode;
        struct btrfs_root *root = BTRFS_I(inode)->root;
        int ret = 0;