From: Andy Whitcroft <apw@canonical.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Andy Whitcroft <apw@canonical.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
mszeredi@suse.cz, Al Viro <viro@zeniv.linux.org.uk>
Subject: [PATCH 1/1] overlayfs -- ovl_path_open should not take path reference
Date: Thu, 27 Jun 2013 17:26:42 +0100 [thread overview]
Message-ID: <1372350404-10359-2-git-send-email-apw@canonical.com> (raw)
In-Reply-To: <1372350404-10359-1-git-send-email-apw@canonical.com>
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@zeniv.linux.org.uk>
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@canonical.com>
---
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
next prev parent reply other threads:[~2013-06-27 16:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-27 16:26 [PATCH 0/3] overlayfs fixes for v3.8 and later base Andy Whitcroft
2013-06-27 16:26 ` Andy Whitcroft [this message]
2013-06-27 16:26 ` [PATCH 1/2] vfs: export do_splice_direct() to modules -- fix Andy Whitcroft
2013-06-27 16:26 ` [PATCH 2/2] overlayfs -- follow change to do_splice_direct interface Andy Whitcroft
2013-06-27 16:37 ` Miklos Szeredi
2013-06-27 17:22 ` Andy Whitcroft
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1372350404-10359-2-git-send-email-apw@canonical.com \
--to=apw@canonical.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mszeredi@suse.cz \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).