GIT: unionfs2-2.6.27.y: unionfs: minor cleanup and better commenting in new_dentry_private_data

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


commit 0c019440dbae33788a119fcca25cabb8192020c7
Author: Erez_Zadok <ezk at cs.sunysb.edu>
Date:   Fri May 25 15:47:44 2007 -0400

    unionfs: minor cleanup and better commenting in new_dentry_private_data
    
    Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>

diff --git a/fs/unionfs/lookup.c b/fs/unionfs/lookup.c
index 0593f56..ffc0044 100644
--- a/fs/unionfs/lookup.c
+++ b/fs/unionfs/lookup.c
@@ -458,7 +458,10 @@ void free_dentry_private_data(struct unionfs_dentry_info *udi)
 	kmem_cache_free(unionfs_dentry_cachep, udi);
 }
 
-/* allocate new dentry private data, free old one if necessary */
+/*
+ * Allocate new dentry private data, free old one if necessary.
+ * On success, returns a dentry whose ->info node is locked already.
+ */
 int new_dentry_private_data(struct dentry *dentry)
 {
 	int size;
@@ -476,9 +479,7 @@ int new_dentry_private_data(struct dentry *dentry)
 
 	mutex_lock(&info->lock);
 
-	info->bstart = -1;
-	info->bend = -1;
-	info->bopaque = -1;
+	info->bstart = info->bend = info->bopaque = -1;
 	info->bcount = sbmax(dentry->d_sb);
 	atomic_set(&info->generation,
 		   atomic_read(&UNIONFS_SB(dentry->d_sb)->generation));


More information about the unionfs-cvs mailing list