Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347859
b: refs/heads/master
c: 68f1bb8
h: refs/heads/master
i:
  347857: d170dcb
  347855: b34bb18
v: v3
  • Loading branch information
Jeff Layton authored and Al Viro committed Dec 20, 2012
1 parent 72c94d9 commit 40bb619
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a69201d6f08240f20a0d33a1b7273d1e7748791c
refs/heads/master: 68f1bb8bb89e0bb813c893a42373a26ebdab7f9c
9 changes: 7 additions & 2 deletions trunk/fs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,9 @@ SYSCALL_DEFINE5(setxattr, const char __user *, pathname,
{
struct path path;
int error;

error = user_path(pathname, &path);
unsigned int lookup_flags = LOOKUP_FOLLOW;
retry:
error = user_path_at(AT_FDCWD, pathname, lookup_flags, &path);
if (error)
return error;
error = mnt_want_write(path.mnt);
Expand All @@ -380,6 +381,10 @@ SYSCALL_DEFINE5(setxattr, const char __user *, pathname,
mnt_drop_write(path.mnt);
}
path_put(&path);
if (retry_estale(error, lookup_flags)) {
lookup_flags |= LOOKUP_REVAL;
goto retry;
}
return error;
}

Expand Down

0 comments on commit 40bb619

Please sign in to comment.