aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-12-20 16:28:33 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-12-20 18:50:04 -0500
commitc6ee920698301febdf10df0b57039173a1edbd43 (patch)
tree48534e0529a69f534264a94854d1db0d1951eb51 /fs/namei.c
parent9e790bd65ce4cbfdff305a57b67b1a2cbe5d4335 (diff)
vfs: make do_rmdir retry once on ESTALE errors
Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 19190618695f..fe06a2fd1925 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -3339,8 +3339,9 @@ static long do_rmdir(int dfd, const char __user *pathname)
3339 struct filename *name; 3339 struct filename *name;
3340 struct dentry *dentry; 3340 struct dentry *dentry;
3341 struct nameidata nd; 3341 struct nameidata nd;
3342 3342 unsigned int lookup_flags = 0;
3343 name = user_path_parent(dfd, pathname, &nd, 0); 3343retry:
3344 name = user_path_parent(dfd, pathname, &nd, lookup_flags);
3344 if (IS_ERR(name)) 3345 if (IS_ERR(name))
3345 return PTR_ERR(name); 3346 return PTR_ERR(name);
3346 3347
@@ -3382,6 +3383,10 @@ exit2:
3382exit1: 3383exit1:
3383 path_put(&nd.path); 3384 path_put(&nd.path);
3384 putname(name); 3385 putname(name);
3386 if (retry_estale(error, lookup_flags)) {
3387 lookup_flags |= LOOKUP_REVAL;
3388 goto retry;
3389 }
3385 return error; 3390 return error;
3386} 3391}
3387 3392