commit 7e7d4d13c220a6e4d7cae8093e0834f210b50390
Author: Erez Zadok <[EMAIL PROTECTED]>
Date:   Thu Jan 10 06:59:15 2008 -0500

    Unionfs: remove unnecessary conditional inode lock
    
    This was intended to protect the inode during branch management, but that is
    now done through our superblock rwsem.
    
    Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>

diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c
index 767225e..4f67419 100644
--- a/fs/unionfs/dentry.c
+++ b/fs/unionfs/dentry.c
@@ -33,7 +33,6 @@ static bool __unionfs_d_revalidate_one(struct dentry *dentry,
        int bindex, bstart, bend;
        int sbgen, dgen;
        int positive = 0;
-       int locked = 0;
        int interpose_flag;
        struct nameidata lowernd; /* TODO: be gentler to the stack */
 
@@ -100,16 +99,6 @@ static bool __unionfs_d_revalidate_one(struct dentry 
*dentry,
                interpose_flag = INTERPOSE_REVAL_NEG;
                if (positive) {
                        interpose_flag = INTERPOSE_REVAL;
-                       /*
-                        * During BRM, the VFS could already hold a lock on
-                        * a file being read, so don't lock it again
-                        * (deadlock), but if you lock it in this function,
-                        * then release it here too.
-                        */
-                       if (!mutex_is_locked(&dentry->d_inode->i_mutex)) {
-                               mutex_lock(&dentry->d_inode->i_mutex);
-                               locked = 1;
-                       }
 
                        bstart = ibstart(dentry->d_inode);
                        bend = ibend(dentry->d_inode);
@@ -128,8 +117,6 @@ static bool __unionfs_d_revalidate_one(struct dentry 
*dentry,
                        UNIONFS_I(dentry->d_inode)->lower_inodes = NULL;
                        ibstart(dentry->d_inode) = -1;
                        ibend(dentry->d_inode) = -1;
-                       if (locked)
-                               mutex_unlock(&dentry->d_inode->i_mutex);
                }
                /* on reval, als purge the odf dentry, if any */
                if (UNIONFS_D(dentry)->odf.dentry) {
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to