Remove unnecessary locking of sb in check_empty and odf_cache_dir
authorRachita Kothiyal <rachita@louie.fsl.cs.sunysb.edu>
Thu, 10 Jan 2008 12:05:55 +0000 (07:05 -0500)
committerRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Thu, 1 May 2008 23:03:31 +0000 (19:03 -0400)
Signed-off-by: Rachita Kothiyal <rachita@fsl.cs.sunysb.edu>
fs/unionfs/dirhelper.c

index f0551481fadd2b6b2874fd7264bc57700a2c3ced..94d9441086ecc8379170a2cb8cd02f34ed8e8a0e 100644 (file)
@@ -219,8 +219,6 @@ int check_empty(struct dentry *dentry, struct unionfs_dir_state **namelist)
        int bindex, bstart, bend, bopaque;
 
        sb = dentry->d_sb;
-       unionfs_read_lock(sb);
-
 
        BUG_ON(!S_ISDIR(dentry->d_inode->i_mode));
 
@@ -295,7 +293,6 @@ out:
                kfree(buf);
        }
 
-       unionfs_read_unlock(sb);
        return err;
 }
 
@@ -314,7 +311,6 @@ int odf_cache_dir(struct dentry *d_upper, struct dentry *d_odf,
        struct iattr attr;
 
        sb = d_upper->d_sb;
-       unionfs_read_lock(sb);
 
        err = unionfs_partial_lookup(d_upper);
        if (err)
@@ -441,7 +437,6 @@ out:
        }
 
 out_sb:
-       unionfs_read_unlock(sb);
        return err;
 }