From d3750ba191e24b8f8318523cd107f2780704984b Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Thu, 10 Jan 2008 07:05:11 -0500 Subject: [PATCH] Unionfs: minor cleanup in check_empty Signed-off-by: Erez Zadok --- fs/unionfs/dirhelper.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/unionfs/dirhelper.c b/fs/unionfs/dirhelper.c index 7a56d6ba9a..f0551481fa 100644 --- a/fs/unionfs/dirhelper.c +++ b/fs/unionfs/dirhelper.c @@ -212,6 +212,7 @@ int check_empty(struct dentry *dentry, struct unionfs_dir_state **namelist) { int err = 0; struct dentry *lower_dentry = NULL; + struct vfsmount *mnt; struct super_block *sb; struct file *lower_file; struct unionfs_rdutil_callback *buf = NULL; @@ -257,15 +258,11 @@ int check_empty(struct dentry *dentry, struct unionfs_dir_state **namelist) continue; dget(lower_dentry); - unionfs_mntget(dentry, bindex); + mnt = unionfs_mntget(dentry, bindex); branchget(sb, bindex); - lower_file = - dentry_open(lower_dentry, - unionfs_lower_mnt_idx(dentry, bindex), - O_RDONLY); + lower_file = dentry_open(lower_dentry, mnt, O_RDONLY); if (IS_ERR(lower_file)) { err = PTR_ERR(lower_file); - dput(lower_dentry); branchput(sb, bindex); goto out; } -- 2.34.1