Patchwork [1/1] UBUNTU: ubuntu: overlayfs -- fix missmerge of vfs_open changes

login
register
mail settings
Submitter Andy Whitcroft
Date Feb. 14, 2013, 11:29 a.m.
Message ID <1360841351-7950-2-git-send-email-apw@canonical.com>
Download mbox | patch
Permalink /patch/220417/
State New
Headers show

Comments

Andy Whitcroft - Feb. 14, 2013, 11:29 a.m.
BugLink: http://bugs.launchpad.net/bugs/1122094
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 fs/open.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Tim Gardner - Feb. 14, 2013, 12:54 p.m.

Stefan Bader - Feb. 14, 2013, 1:05 p.m.

Patch

diff --git a/fs/open.c b/fs/open.c
index 7be104a..a500c82 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -831,8 +831,12 @@  struct file *nameidata_to_filp(struct nameidata *nd)
 		nd->intent.open.file = NULL;
 	} else {
 		struct file *res;
+		struct inode *inode = nd->path.dentry->d_inode;
 
-		res = vfs_open(&nd->path, filp, cred);
+		if (inode->i_op->open)
+			return inode->i_op->open(nd->path.dentry, filp, cred);
+
+		res = do_dentry_open(&nd->path, filp, NULL, cred);
 		if (!IS_ERR(res)) {
 			int error;