cifs: set rc to -ENOENT if we can not get a dentry for the cached dir
authorRonnie Sahlberg <lsahlber@redhat.com>
Mon, 17 Oct 2022 23:48:26 +0000 (18:48 -0500)
committerSteve French <stfrench@microsoft.com>
Tue, 18 Oct 2022 16:33:43 +0000 (11:33 -0500)
commit053569ccde2a41abcc592781451cd16eaa6e8bab
treeac5a59779bfe05d8b8c982360f15f609c4e68c9d
parentd32f211adb6aa179c00ee1c251315d1ef1433a38
cifs: set rc to -ENOENT if we can not get a dentry for the cached dir

We already set rc to this return code further down in the function but
we can set it earlier in order to suppress a smash warning.

Also fix a false positive for Coverity. The reason this is a false positive is
that this happens during umount after all files and directories have been closed
but mosetting on ->on_list to suppress the warning.

Reported-by: Dan carpenter <dan.carpenter@oracle.com>
Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1525256 ("Concurrent data access violations")
Fixes: a350d6e73f5e ("cifs: enable caching of directories for which a lease is held")
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cached_dir.c