diff options
author | Jeff Layton <jlayton@redhat.com> | 2012-12-20 16:28:33 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-20 18:50:04 -0500 |
commit | c6ee920698301febdf10df0b57039173a1edbd43 (patch) | |
tree | 48534e0529a69f534264a94854d1db0d1951eb51 /fs/namei.c | |
parent | 9e790bd65ce4cbfdff305a57b67b1a2cbe5d4335 (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.c | 9 |
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); | 3343 | retry: |
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: | |||
3382 | exit1: | 3383 | exit1: |
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 | ||