commit 5f43a7565b1ff5503052810245650f0c0a840bc2
Author: Erez Zadok <[EMAIL PROTECTED]>
Date:   Tue Apr 15 19:54:44 2008 -0400

    Unionfs: copy lower times in fsync/fasync only when needed
    
    Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>

diff --git a/fs/unionfs/file.c b/fs/unionfs/file.c
index 7cb7f61..985b759 100644
--- a/fs/unionfs/file.c
+++ b/fs/unionfs/file.c
@@ -196,13 +196,13 @@ int unionfs_fsync(struct file *file, struct dentry 
*dentry, int datasync)
                err = lower_inode->i_fop->fsync(lower_file,
                                                lower_dentry,
                                                datasync);
+               if (!err && bindex == bstart)
+                       fsstack_copy_attr_times(inode, lower_inode);
                mutex_unlock(&lower_inode->i_mutex);
                if (err)
                        goto out;
        }
 
-       unionfs_copy_attr_times(inode);
-
 out:
        if (!err)
                unionfs_check_file(file);
@@ -244,13 +244,13 @@ int unionfs_fasync(int fd, struct file *file, int flag)
                lower_file = unionfs_lower_file_idx(file, bindex);
                mutex_lock(&lower_inode->i_mutex);
                err = lower_inode->i_fop->fasync(fd, lower_file, flag);
+               if (!err && bindex == bstart)
+                       fsstack_copy_attr_times(inode, lower_inode);
                mutex_unlock(&lower_inode->i_mutex);
                if (err)
                        goto out;
        }
 
-       unionfs_copy_attr_times(inode);
-
 out:
        if (!err)
                unionfs_check_file(file);
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to