nfsd: store stat times in fill_pre_wcc() instead of inode times
authorAmir Goldstein <amir73il@gmail.com>
Wed, 3 Jan 2018 15:14:35 +0000 (17:14 +0200)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 8 Feb 2018 18:40:17 +0000 (13:40 -0500)
commit39ca1bf624b6b82cc895b0217889eaaf572a7913
tree70ec631d24cd767513f61896c26b4cba83fec6af
parent76c479480b9afff4c585a17e19a1efe3457a2d9b
nfsd: store stat times in fill_pre_wcc() instead of inode times

The time values in stat and inode may differ for overlayfs and stat time
values are the correct ones to use. This is also consistent with the fact
that fill_post_wcc() also stores stat time values.

This means introducing a stat call that could fail, where previously we
were just copying values out of the inode.  To be conservative about
changing behavior, we fall back to copying values out of the inode in
the error case.  It might be better just to clear fh_pre_saved (though
note the BUG_ON in set_change_info).

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs3xdr.c
fs/nfsd/nfs4xdr.c
fs/nfsd/nfsfh.h