diff options
author | Jeff Layton <jlayton@redhat.com> | 2012-12-21 01:28:33 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-21 03:50:04 +0400 |
commit | c6ee920698301febdf10df0b57039173a1edbd43 (patch) | |
tree | 48534e0529a69f534264a94854d1db0d1951eb51 /fs/namei.c | |
parent | 9e790bd65ce4cbfdff305a57b67b1a2cbe5d4335 (diff) | |
download | linux-c6ee920698301febdf10df0b57039173a1edbd43.tar.xz |
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) struct filename *name; struct dentry *dentry; struct nameidata nd; - - name = user_path_parent(dfd, pathname, &nd, 0); + unsigned int lookup_flags = 0; +retry: + name = user_path_parent(dfd, pathname, &nd, lookup_flags); if (IS_ERR(name)) return PTR_ERR(name); @@ -3382,6 +3383,10 @@ exit2: exit1: path_put(&nd.path); putname(name); + if (retry_estale(error, lookup_flags)) { + lookup_flags |= LOOKUP_REVAL; + goto retry; + } return error; } |