]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit0f0d2109b0ae6e8c652e78b2acbfeee017712fcc
tree70ec631d24cd767513f61896c26b4cba83fec6af
parentfe0fafbddc83ae5711e8caadaaa97c994278bc48
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