bug fix: prevent null mntget warning messages in unionfs_lookup_backend
authorErez_Zadok <ezk@cs.sunysb.edu>
Mon, 28 May 2007 23:38:14 +0000 (19:38 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 11 Nov 2014 02:31:37 +0000 (21:31 -0500)
Don't try to mntget a lower mnt at a point where the lower mnts don't yet
exist (the callers will have them later on).  Instead, get the lower mnt of
the sb->s_root.

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

index 6409387ec81647f34ba63c85da25f7f72f5d344f..ead0c6ac80636e9574044f43b7b25278df98e57d 100644 (file)
@@ -328,7 +328,7 @@ out_negative:
                 * mount-point crossing
                 */
                first_dentry = dentry;
-               first_hidden_mnt = unionfs_mntget(dentry, bindex);
+               first_hidden_mnt = unionfs_mntget(dentry->d_sb->s_root, bindex);
        }
        unionfs_set_lower_dentry_idx(dentry, first_dentry_offset,
                                     first_hidden_dentry);