Unionfs: update fsync prototype
authorErez Zadok <ezk@cs.sunysb.edu>
Fri, 6 Aug 2010 05:48:52 +0000 (01:48 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 12 Aug 2011 02:39:19 +0000 (22:39 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/copyup.c
fs/unionfs/file.c
fs/unionfs/union.h

index 9c7b2acb17be8a8f574ff1ca01d95058869ae320..bba3a75418514e913e7fe352033d6b52df29718b 100644 (file)
@@ -326,8 +326,7 @@ static int __copyup_reg_data(struct dentry *dentry,
        kfree(buf);
 
        if (!err)
-               err = output_file->f_op->fsync(output_file,
-                                              new_lower_dentry, 0);
+               err = output_file->f_op->fsync(output_file, 0);
 
        if (err)
                goto out_close_out;
index 46eaa90400537d554630d957a60e96041a7009e3..5a8f4e0774bc427ddfa7eaba99d51fb0dac5236b 100644 (file)
@@ -188,10 +188,11 @@ out:
        return err;
 }
 
-int unionfs_fsync(struct file *file, struct dentry *dentry, int datasync)
+int unionfs_fsync(struct file *file, int datasync)
 {
        int bindex, bstart, bend;
        struct file *lower_file;
+       struct dentry *dentry = file->f_path.dentry;
        struct dentry *lower_dentry;
        struct dentry *parent;
        struct inode *lower_inode, *inode;
@@ -224,9 +225,7 @@ int unionfs_fsync(struct file *file, struct dentry *dentry, int datasync)
                lower_file = unionfs_lower_file_idx(file, bindex);
                lower_dentry = unionfs_lower_dentry_idx(dentry, bindex);
                mutex_lock(&lower_inode->i_mutex);
-               err = lower_inode->i_fop->fsync(lower_file,
-                                               lower_dentry,
-                                               datasync);
+               err = lower_inode->i_fop->fsync(lower_file, datasync);
                if (!err && bindex == bstart)
                        fsstack_copy_attr_times(inode, lower_inode);
                mutex_unlock(&lower_inode->i_mutex);
index 99335a3499bfc7207a453c7c8c2d5a30773305d7..d49c8343a54ff5ef5891ff4d311af7578cf7f551 100644 (file)
@@ -416,8 +416,7 @@ extern int unionfs_file_release(struct inode *inode, struct file *file);
 extern int unionfs_flush(struct file *file, fl_owner_t id);
 extern long unionfs_ioctl(struct file *file, unsigned int cmd,
                          unsigned long arg);
-extern int unionfs_fsync(struct file *file, struct dentry *dentry,
-                        int datasync);
+extern int unionfs_fsync(struct file *file, int datasync);
 extern int unionfs_fasync(int fd, struct file *file, int flag);
 
 /* Inode operations */