mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 14:44:10 +08:00
NFSv4: Fixes for nfs4_bitmask_adjust()
We don't want to ask for the ACL in a WRITE reply, since we don't have
a preallocated buffer.
Instead of checking NFS_INO_INVALID_ACCESS, which is really about
managing the access cache, we should look at the value of
NFS_INO_INVALID_OTHER. Also ensure we assign the mode, owner and
owner_group flags to the correct bit mask.
Finally, fix up the check for NFS_INO_INVALID_CTIME to retrieve the
ctime, and add a check for NFS_INO_INVALID_CHANGE.
Fixes: 76bd5c016e
("NFSv4: make cache consistency bitmask dynamic")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
586a0787ce
commit
45901a2317
@ -5435,15 +5435,16 @@ static void nfs4_bitmask_adjust(__u32 *bitmask, struct inode *inode,
|
||||
|
||||
if (cache_validity & NFS_INO_INVALID_ATIME)
|
||||
bitmask[1] |= FATTR4_WORD1_TIME_ACCESS;
|
||||
if (cache_validity & NFS_INO_INVALID_ACCESS)
|
||||
bitmask[0] |= FATTR4_WORD1_MODE | FATTR4_WORD1_OWNER |
|
||||
FATTR4_WORD1_OWNER_GROUP;
|
||||
if (cache_validity & NFS_INO_INVALID_ACL)
|
||||
bitmask[0] |= FATTR4_WORD0_ACL;
|
||||
if (cache_validity & NFS_INO_INVALID_LABEL)
|
||||
if (cache_validity & NFS_INO_INVALID_OTHER)
|
||||
bitmask[1] |= FATTR4_WORD1_MODE | FATTR4_WORD1_OWNER |
|
||||
FATTR4_WORD1_OWNER_GROUP |
|
||||
FATTR4_WORD1_NUMLINKS;
|
||||
if (label && label->len && cache_validity & NFS_INO_INVALID_LABEL)
|
||||
bitmask[2] |= FATTR4_WORD2_SECURITY_LABEL;
|
||||
if (cache_validity & NFS_INO_INVALID_CTIME)
|
||||
if (cache_validity & NFS_INO_INVALID_CHANGE)
|
||||
bitmask[0] |= FATTR4_WORD0_CHANGE;
|
||||
if (cache_validity & NFS_INO_INVALID_CTIME)
|
||||
bitmask[1] |= FATTR4_WORD1_TIME_METADATA;
|
||||
if (cache_validity & NFS_INO_INVALID_MTIME)
|
||||
bitmask[1] |= FATTR4_WORD1_TIME_MODIFY;
|
||||
if (cache_validity & NFS_INO_INVALID_SIZE)
|
||||
|
Loading…
Reference in New Issue
Block a user