nfs: modify update_changeattr to deal with regular files
authorFrank van der Linden <fllinden@amazon.com>
Tue, 23 Jun 2020 22:38:59 +0000 (22:38 +0000)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 13 Jul 2020 21:52:45 +0000 (17:52 -0400)
commit1b523ca972edba2025e45080b08385928a29aa30
tree61d09ce575fe31583fe0ef4b7221c0f461c1eb67
parent72832a2453d9ca752beedb3a4fb2fc82e375c46c
nfs: modify update_changeattr to deal with regular files

Until now, change attributes in change_info form were only returned by
directory operations. However, they are also used for the RFC 8276
extended attribute operations, which work on both directories
and regular files.  Modify update_changeattr to deal:

* Rename it to nfs4_update_changeattr and make it non-static.
* Don't always use INO_INVALID_DATA, this isn't needed for a
  directory that only had its extended attributes changed by us.
* Existing callers now always pass in INO_INVALID_DATA.

For the current callers of this function, behavior is unchanged.

Signed-off-by: Frank van der Linden <fllinden@amazon.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/nfs4_fs.h
fs/nfs/nfs4proc.c