Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

NFSD: fix setting FMODE_NOCMTIME in nfs4_open_delegation

fstests generic/215 and generic/407 were failing because the server
wasn't updating mtime properly. When deleg attribute support is not
compiled in and thus no attribute delegation was given, the server
was skipping updating mtime and ctime because FMODE_NOCMTIME was
uncoditionally set for the write delegation.

Fixes: e5e9b24ab8fa ("nfsd: freeze c/mtime updates with outstanding WRITE_ATTRS delegation")
Cc: stable@vger.kernel.org
Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

authored by

Olga Kornievskaia and committed by
Chuck Lever
41b0a87b ae78eb49

+2 -1
+2 -1
fs/nfsd/nfs4state.c
··· 6353 6353 dp->dl_ctime = stat.ctime; 6354 6354 dp->dl_mtime = stat.mtime; 6355 6355 spin_lock(&f->f_lock); 6356 - f->f_mode |= FMODE_NOCMTIME; 6356 + if (deleg_ts) 6357 + f->f_mode |= FMODE_NOCMTIME; 6357 6358 spin_unlock(&f->f_lock); 6358 6359 trace_nfsd_deleg_write(&dp->dl_stid.sc_stateid); 6359 6360 } else {