From ffbee29c57d2370f47374dad5c7e0e6da3a9ca15 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 22 Feb 2011 22:27:28 -0500 Subject: [PATCH] --- yaml --- r: 234248 b: refs/heads/master c: f1afe9efc84476ca42fbb7301a441021063eead7 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/namei.c | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 648ed691ea91..b21889306214 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 36f3b4f69070fee7c647bab5dc4408990bb3606c +refs/heads/master: f1afe9efc84476ca42fbb7301a441021063eead7 diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index f956567270bb..e0f59031be87 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -2426,15 +2426,12 @@ struct file *do_filp_open(int dfd, const char *pathname, nd.flags |= LOOKUP_PARENT; error = __do_follow_link(&link, &nd, &cookie); if (unlikely(error)) { - if (!IS_ERR(cookie) && linki->i_op->put_link) - linki->i_op->put_link(link.dentry, &nd, cookie); - /* nd.path had been dropped */ - nd.path = link; - goto out_path; + filp = ERR_PTR(error); + } else { + nd.flags &= ~LOOKUP_PARENT; + filp = do_last(&nd, &path, open_flag, acc_mode, mode, pathname); } - nd.flags &= ~LOOKUP_PARENT; - filp = do_last(&nd, &path, open_flag, acc_mode, mode, pathname); - if (linki->i_op->put_link) + if (!IS_ERR(cookie) && linki->i_op->put_link) linki->i_op->put_link(link.dentry, &nd, cookie); path_put(&link); }