lkml.org 
[lkml]   [2012]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1 09/12] vfs: make do_unlinkat retry on ESTALE errors
Date
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
fs/namei.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/fs/namei.c b/fs/namei.c
index d754460..3a8e5e4 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2863,8 +2863,9 @@ static long do_unlinkat(int dfd, const char __user *pathname)
struct dentry *dentry;
struct nameidata nd;
struct inode *inode = NULL;
-
- error = user_path_parent(dfd, pathname, &nd, &name, false);
+ unsigned int try = 0;
+retry:
+ error = user_path_parent(dfd, pathname, &nd, &name, try);
if (error)
return error;

@@ -2903,6 +2904,8 @@ exit3:
exit1:
path_put(&nd.path);
putname(name);
+ if (retry_estale(error, try++))
+ goto retry;
return error;

slashes:
--
1.7.7.6


\
 
 \ /
  Last update: 2012-04-26 18:09    [W:0.037 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site