[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1335455843-16089-9-git-send-email-jlayton@redhat.com>
Date: Thu, 26 Apr 2012 11:57:21 -0400
From: Jeff Layton <jlayton@...hat.com>
To: viro@...IV.linux.org.uk
Cc: linux-fsdevel@...r.kernel.org, linux-nfs@...r.kernel.org,
linux-kernel@...r.kernel.org, miklos@...redi.hu, hch@...radead.org,
michael.brantley@...haw.com
Subject: [PATCH v1 10/12] vfs: fix symlinkat to retry on ESTALE errors
Signed-off-by: Jeff Layton <jlayton@...hat.com>
---
fs/namei.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/fs/namei.c b/fs/namei.c
index 3a8e5e4..b189dc5 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2957,12 +2957,14 @@ SYSCALL_DEFINE3(symlinkat, const char __user *, oldname,
char *from;
struct dentry *dentry;
struct path path;
+ unsigned int try = 0;
from = getname(oldname);
if (IS_ERR(from))
return PTR_ERR(from);
- dentry = user_path_create(newdfd, newname, &path, false, false);
+retry:
+ dentry = user_path_create(newdfd, newname, &path, false, try);
error = PTR_ERR(dentry);
if (IS_ERR(dentry))
goto out_putname;
@@ -2980,6 +2982,8 @@ out_dput:
dput(dentry);
mutex_unlock(&path.dentry->d_inode->i_mutex);
path_put(&path);
+ if (retry_estale(error, try++))
+ goto retry;
out_putname:
putname(from);
return error;
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists