]> www.infradead.org Git - users/jedix/linux-maple.git/commit
NFS: Correct timing for assigning access cache timestamp
authorChengen Du <chengen.du@canonical.com>
Wed, 8 Mar 2023 08:03:27 +0000 (16:03 +0800)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 24 Mar 2023 14:25:31 +0000 (10:25 -0400)
commitc6db2e53fd4671c2d5a6acc64202823f07c7b030
tree95f38fa2768a4be8a59202c629c210e633b5514a
parentdfe52da68e661bea89f6dc5a183aef03b2d1c2c2
NFS: Correct timing for assigning access cache timestamp

When the user's login time is newer than the cache's timestamp,
the original entry in the RB-tree will be replaced by a new entry.
Currently, the timestamp is only set if the entry is not found in
the RB-tree, which can cause the timestamp to be undefined when
the entry exists. This may result in a significant increase in
ACCESS operations if the timestamp is set to zero.

Signed-off-by: Chengen Du <chengen.du@canonical.com>
Fixes: 0eb43812c027 ("NFS: Clear the file access cache upon login”)
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/dir.c