Skip to content

Commit 261998c

Browse files
lxbszidryomov
authored andcommitted
ceph: fix statx AT_STATX_DONT_SYNC vs AT_STATX_FORCE_SYNC check
From the posix and the initial statx supporting commit comments, the AT_STATX_DONT_SYNC is a lightweight stat and the AT_STATX_FORCE_SYNC is a heaverweight one. And also checked all the other current usage about these two flags they are all doing the same, that is only when the AT_STATX_FORCE_SYNC is not set and the AT_STATX_DONT_SYNC is set will they skip sync retriving the attributes from storage. Signed-off-by: Xiubo Li <[email protected]> Reviewed-by: David Howells <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 68e5ec2 commit 261998c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ceph/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2424,7 +2424,7 @@ int ceph_getattr(struct user_namespace *mnt_userns, const struct path *path,
24242424
return -ESTALE;
24252425

24262426
/* Skip the getattr altogether if we're asked not to sync */
2427-
if (!(flags & AT_STATX_DONT_SYNC)) {
2427+
if ((flags & AT_STATX_SYNC_TYPE) != AT_STATX_DONT_SYNC) {
24282428
err = ceph_do_getattr(inode,
24292429
statx_to_caps(request_mask, inode->i_mode),
24302430
flags & AT_STATX_FORCE_SYNC);

0 commit comments

Comments
 (0)