diff mbox

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

Message ID 1360841351-7950-2-git-send-email-apw@canonical.com
State New
Headers show

Commit Message

Andy Whitcroft Feb. 14, 2013, 11:29 a.m. UTC
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(-)

Comments

Tim Gardner Feb. 14, 2013, 12:54 p.m. UTC | #1

Stefan Bader Feb. 14, 2013, 1:05 p.m. UTC | #2

diff mbox

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;