unionfs: minor cleanup and better commenting in new_dentry_private_data
authorErez_Zadok <ezk@cs.sunysb.edu>
Fri, 25 May 2007 19:47:44 +0000 (15:47 -0400)
committerErez_Zadok <ezk@cs.sunysb.edu>
Mon, 23 Jul 2007 00:50:43 +0000 (20:50 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/lookup.c

index 0593f569186e56806024ea71c628a35f75127d9d..ffc00446ce62b8388c5e5c56125f1a343bbcc3f5 100644 (file)
@@ -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));