From: Erez Zadok <[EMAIL PROTECTED]>

This fixes a mnt refleak which occured during copyup when directory
hierarchy was recreated on a writable branch.

Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
Signed-off-by: Josef 'Jeff' Sipek <[EMAIL PROTECTED]>
---
 fs/unionfs/copyup.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/unionfs/copyup.c b/fs/unionfs/copyup.c
index 998cc69..e0075ca 100644
--- a/fs/unionfs/copyup.c
+++ b/fs/unionfs/copyup.c
@@ -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;
-- 
1.5.0.2.260.g2eb065

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to