Unionfs: initialize lower mnt in lookup after vfs_path_lookup
authorErez Zadok <ezk@cs.sunysb.edu>
Fri, 19 Sep 2008 23:26:55 +0000 (19:26 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 19 Sep 2008 23:26:55 +0000 (19:26 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/lookup.c

index 5c9da0358735d50b4ab4bfb0eeb844be4a97cacd..ba9f5c7a80e814d90dcac10fb1996f3f22fd28ea 100644 (file)
@@ -324,7 +324,9 @@ struct dentry *unionfs_lookup_full(struct dentry *dentry,
                        goto out_free;
                }
                unionfs_set_lower_dentry_idx(dentry, bindex, lower_dentry);
-               BUG_ON(!lower_mnt);
+               if (!lower_mnt)
+                       lower_mnt = unionfs_mntget(dentry->d_sb->s_root,
+                                                  bindex);
                unionfs_set_lower_mnt_idx(dentry, bindex, lower_mnt);
 
                /* adjust dbstart/end */