Skip to content

Commit 8f9e967

Browse files
jtlaytonchucklever
authored andcommitted
nfsd: use ATTR_DELEG in nfsd4_finalize_deleg_timestamps()
When finalizing timestamps that have never been updated and preparing to release the delegation lease, the notify_change() call can trigger a delegation break, and fail to update the timestamps. When this happens, there will be messages like this in dmesg: [ 2709.375785] Unable to update timestamps on inode 00:39:263: -11 Since this code is going to release the lease just after updating the timestamps, breaking the delegation is undesirable. Fix this by setting ATTR_DELEG in ia_valid, in order to avoid the delegation break. Fixes: e5e9b24 ("nfsd: freeze c/mtime updates with outstanding WRITE_ATTRS delegation") Cc: [email protected] Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent 8072e34 commit 8f9e967

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/nfsd/nfs4state.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,7 @@ static void put_deleg_file(struct nfs4_file *fp)
12261226

12271227
static void nfsd4_finalize_deleg_timestamps(struct nfs4_delegation *dp, struct file *f)
12281228
{
1229-
struct iattr ia = { .ia_valid = ATTR_ATIME | ATTR_CTIME | ATTR_MTIME };
1229+
struct iattr ia = { .ia_valid = ATTR_ATIME | ATTR_CTIME | ATTR_MTIME | ATTR_DELEG };
12301230
struct inode *inode = file_inode(f);
12311231
int ret;
12321232

0 commit comments

Comments
 (0)