]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: create a helper to find a writeable handle by path name
authorRonnie Sahlberg <lsahlber@redhat.com>
Thu, 29 Aug 2019 22:25:46 +0000 (08:25 +1000)
committerSteve French <stfrench@microsoft.com>
Mon, 16 Sep 2019 16:43:37 +0000 (11:43 -0500)
commit921a4b29fa175ff62430aca94863ae635525080c
treebbcca0ff9e4b61fbedbdfec6d28f04580506adf7
parentd4e808a59cb4659b869887a6b0e51f0bb83eedea
cifs: create a helper to find a writeable handle by path name

rename() takes a path for old_file and in SMB2 we used to just create
a compound for create(old_path)/rename/close().
If we already have a writable handle we can avoid the create() and close()
altogether and just use the existing handle.

For this situation, as we avoid doing the create()
we also avoid triggering an oplock break for the existing handle.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsproto.h
fs/cifs/dir.c
fs/cifs/file.c
fs/cifs/smb2inode.c