diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ceph/caps.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index d3274120f738..d09b9d91cf4f 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -2666,7 +2666,10 @@ again: } snap_rwsem_locked = true; } - *got = need | (have & want); + if ((have & want) == want) + *got = need | want; + else + *got = need; if (S_ISREG(inode->i_mode) && (need & CEPH_CAP_FILE_RD) && !(*got & CEPH_CAP_FILE_CACHE)) |