GIT: unionfs2-2.6.27.y: fs/unionfs/: Don't grab dentry private data mutex in unionfs_d_release

Erez Zadok ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:15:51 EDT 2010


commit bd71762ba043362e1ffb574a2b1137f7093ab8a9
Author: Josef 'Jeff' Sipek <jsipek at cs.sunysb.edu>
Date:   Fri Feb 23 01:04:09 2007 -0500

    fs/unionfs/: Don't grab dentry private data mutex in unionfs_d_release
    
    Grabbing the UNIONFS_D(dentry)->lock is completely unnecessary and there are
    no other references; we are about to free the object anyway. Additionally,
    grabbing the mutex produces warning when the slab object is reused - as it
    was freed while there still was a reference to it.
    
    Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>
    Signed-off-by: Josef 'Jeff' Sipek <jsipek at cs.sunysb.edu>

diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c
index 3721409..ac4bf0e 100644
--- a/fs/unionfs/dentry.c
+++ b/fs/unionfs/dentry.c
@@ -190,12 +190,6 @@ static void unionfs_d_release(struct dentry *dentry)
 {
 	int bindex, bstart, bend;
 
-	/* There is no reason to lock the dentry, because we have the only
-	 * reference, but the printing functions verify that we have a lock
-	 * on the dentry before calling dbstart, etc.
-	 */
-	unionfs_lock_dentry(dentry);
-
 	/* this could be a negative dentry, so check first */
 	if (!UNIONFS_D(dentry)) {
 		printk(KERN_DEBUG "dentry without private data: %.*s",


More information about the unionfs-cvs mailing list