]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: set the CREATE_NOT_FILE when opening the directory in use_cached_dir()
authorRonnie Sahlberg <lsahlber@redhat.com>
Mon, 9 May 2022 23:42:06 +0000 (09:42 +1000)
committerSteve French <stfrench@microsoft.com>
Sat, 21 May 2022 17:23:24 +0000 (12:23 -0500)
commitdb6921e2c81f5fb6a8a628ce97a6131d0846c2a9
tree165254c7fd7aaabb91a043ec5e6f5be6045f8bfb
parent264448c0279db05f3234534a8c13889f86181a05
cifs: set the CREATE_NOT_FILE when opening the directory in use_cached_dir()

This enforces that we can only do this for directories and not normal files
or else the server will return an error.
This means that we will have conditionally check IF the path refers
to a directory or not in all the call-sites where we are unsure.
Right now this check is for "" i.e. root.

Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Reviewed-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2inode.c
fs/cifs/smb2ops.c