From 08716fb0651e4baa33dd14d92e8899f65d45e6fd Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Wed, 12 Oct 2016 07:04:41 -0400 Subject: [PATCH] client: fix AT_SYMLINK_NOFOLLOW handling We're passing the reverse to path_walk. It should be true if we want to follow links. Fixes: f7c885e1f9cefc359f8b6fe7e51e212387432529 Fixes: bce221c1b99a564d2f4827d2f28cbe939184d308 Signed-off-by: Jeff Layton --- src/client/Client.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 1d74c1b511d..e1132535633 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -6658,7 +6658,7 @@ int Client::setattrx(const char *relpath, struct ceph_statx *stx, int mask, filepath path(relpath); InodeRef in; - int r = path_walk(path, &in, perms, flags & AT_SYMLINK_NOFOLLOW); + int r = path_walk(path, &in, perms, !(flags & AT_SYMLINK_NOFOLLOW)); if (r < 0) return r; return _setattrx(in, stx, mask, perms); @@ -6738,7 +6738,7 @@ int Client::statx(const char *relpath, struct ceph_statx *stx, unsigned mask = statx_to_mask(flags, want); - int r = path_walk(path, &in, perms, flags & AT_SYMLINK_NOFOLLOW, mask); + int r = path_walk(path, &in, perms, !(flags & AT_SYMLINK_NOFOLLOW), mask); if (r < 0) return r; -- 2.39.5