Unionfs: use igrab instead of atomic_inc inode refcnt
authorErez_Zadok <ezk@cs.sunysb.edu>
Tue, 17 Jul 2007 03:45:46 +0000 (23:45 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Sun, 6 Mar 2011 08:42:35 +0000 (03:42 -0500)
In branch management code, use igrab() which is better than directly
incrementing the lower inode reference count.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/super.c

index c168b2383c371241871ffe9120ed01049cb6f667..f4118dfa0a361127e797c36cf0bd84da75464d6f 100644 (file)
@@ -740,7 +740,7 @@ out_no_change:
        for (i=dbstart(sb->s_root); i<=dbend(sb->s_root); i++) {
                struct dentry *lower_dentry =
                        unionfs_lower_dentry_idx(sb->s_root, i);
-               atomic_inc(&lower_dentry->d_inode->i_count);
+               igrab(lower_dentry->d_inode);
                new_lower_inodes[i] = lower_dentry->d_inode;
        }
        /* 2. release reference on all older lower inodes */