[PATCH 1/1] overlayfs -- ovl_path_open should not take path reference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since the commit below dentry_open now takes its own references
as required.  We therefore should no longer take path references in
ovl_path_open.  Doing so leaves stray mount references to the underlying
devices preventing them being released:

    commit 765927b2d508712d320c8934db963bbe14c3fcec
    Author: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
    Date:   Tue Jun 26 21:58:53 2012 +0400

        switch dentry_open() to struct path, make it grab references itself

BugLink: http://bugs.launchpad.net/bugs/1098378
Signed-off-by: Andy Whitcroft <apw@xxxxxxxxxxxxx>
---
 fs/overlayfs/super.c | 1 -
 1 file changed, 1 deletion(-)


    Found this in testing on Ubuntu raring, testing against loopback
    mounted files.  Without this change we were unable to release the
    loopback device for reuse.  Looking at it actually we were also leaking
    references on the root filesystem, but these are not as obvious.
    Applies against overlayfs.v17 as rebased to 3.8 and later.

    -apw


diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index 482c26f..9473e79 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -385,7 +385,6 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
 
 struct file *ovl_path_open(struct path *path, int flags)
 {
-	path_get(path);
 	return dentry_open(path, flags, current_cred());
 }
 
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux