fs/unionfs/: mntput in __cleanup_dentry
authorErez Zadok <ezk@cs.sunysb.edu>
Fri, 2 Mar 2007 18:10:56 +0000 (13:10 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 11 Nov 2014 02:29:46 +0000 (21:29 -0500)
This fixes a mnt refleak which occured during copyup when directory
hierarchy was recreated on a writable branch.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
fs/unionfs/copyup.c

index 998cc69ad4897c1286140284f2782c0cdd8f8786..e0075ca84e5e3b6ef17dab4240ce05e22fb9581d 100644 (file)
@@ -548,6 +548,9 @@ static void __cleanup_dentry(struct dentry * dentry, int bindex,
                if (!unionfs_lower_dentry_idx(dentry, i)->d_inode) {
                        dput(unionfs_lower_dentry_idx(dentry, i));
                        unionfs_set_lower_dentry_idx(dentry, i, NULL);
+
+                       mntput(unionfs_lower_mnt_idx(dentry, i));
+                       unionfs_set_lower_mnt_idx(dentry, i, NULL);
                } else {
                        if (new_bstart < 0)
                                new_bstart = i;