mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 02:16:45 +07:00
vfs: make do_unlinkat retry once on ESTALE errors
Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
c6ee920698
commit
5d18f8133c
10
fs/namei.c
10
fs/namei.c
@ -3440,8 +3440,9 @@ static long do_unlinkat(int dfd, const char __user *pathname)
|
|||||||
struct dentry *dentry;
|
struct dentry *dentry;
|
||||||
struct nameidata nd;
|
struct nameidata nd;
|
||||||
struct inode *inode = NULL;
|
struct inode *inode = NULL;
|
||||||
|
unsigned int lookup_flags = 0;
|
||||||
name = user_path_parent(dfd, pathname, &nd, 0);
|
retry:
|
||||||
|
name = user_path_parent(dfd, pathname, &nd, lookup_flags);
|
||||||
if (IS_ERR(name))
|
if (IS_ERR(name))
|
||||||
return PTR_ERR(name);
|
return PTR_ERR(name);
|
||||||
|
|
||||||
@ -3479,6 +3480,11 @@ static long do_unlinkat(int dfd, const char __user *pathname)
|
|||||||
exit1:
|
exit1:
|
||||||
path_put(&nd.path);
|
path_put(&nd.path);
|
||||||
putname(name);
|
putname(name);
|
||||||
|
if (retry_estale(error, lookup_flags)) {
|
||||||
|
lookup_flags |= LOOKUP_REVAL;
|
||||||
|
inode = NULL;
|
||||||
|
goto retry;
|
||||||
|
}
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
slashes:
|
slashes:
|
||||||
|
Loading…
Reference in New Issue
Block a user