From: Jeff Layton Date: Thu, 20 Dec 2012 21:38:04 +0000 (-0500) Subject: vfs: make do_unlinkat retry once on ESTALE errors X-Git-Tag: v3.8-rc1~13^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d18f8133cad85ccbb7fa6fd351d75025da32504;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git vfs: make do_unlinkat retry once on ESTALE errors Signed-off-by: Jeff Layton Signed-off-by: Al Viro --- diff --git a/fs/namei.c b/fs/namei.c index fe06a2f..8a262c2 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -3440,8 +3440,9 @@ static long do_unlinkat(int dfd, const char __user *pathname) struct dentry *dentry; struct nameidata nd; struct inode *inode = NULL; - - 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); @@ -3479,6 +3480,11 @@ exit2: exit1: path_put(&nd.path); putname(name); + if (retry_estale(error, lookup_flags)) { + lookup_flags |= LOOKUP_REVAL; + inode = NULL; + goto retry; + } return error; slashes: