commit abf3f7cb97cb23a9db35968f8a1b906b6a1f58f9
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Apr 15 19:52:03 2008 -0400
Unionfs: lock inode around calls to notify_change()
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
diff --git a/fs/unionfs/copyup.c b/fs/unionfs/copyup.c
index a2ec459..02e909c 100644
--- a/fs/unionfs/copyup.c
+++ b/fs/unionfs/copyup.c
@@ -135,6 +135,7 @@ static int copyup_permissions(struct super_block *sb,
newattrs.ia_valid = ATTR_CTIME | ATTR_ATIME | ATTR_MTIME |
ATTR_ATIME_SET | ATTR_MTIME_SET | ATTR_FORCE |
ATTR_GID | ATTR_UID;
+ mutex_lock(&new_lower_dentry->d_inode->i_mutex);
err = notify_change(new_lower_dentry, &newattrs);
if (err)
goto out;
@@ -152,6 +153,7 @@ static int copyup_permissions(struct super_block *sb,
}
out:
+ mutex_unlock(&new_lower_dentry->d_inode->i_mutex);
return err;
}
diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c
index c490303..04429a1 100644
--- a/fs/unionfs/inode.c
+++ b/fs/unionfs/inode.c
@@ -1022,7 +1022,9 @@ static int unionfs_setattr(struct dentry *dentry, struct
iattr *ia)
}
/* notify the (possibly copied-up) lower inode */
+ mutex_lock(&lower_dentry->d_inode->i_mutex);
err = notify_change(lower_dentry, ia);
+ mutex_unlock(&lower_dentry->d_inode->i_mutex);
if (err)
goto out;
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs