smb: client: fix potential broken compound request
authorPaulo Alcantara <pc@manguebit.com>
Thu, 25 Jan 2024 20:04:05 +0000 (17:04 -0300)
committerSteve French <stfrench@microsoft.com>
Mon, 11 Mar 2024 00:33:58 +0000 (19:33 -0500)
commit6914d288c63682e20e0f6e1e0b8e8f5847012d67
tree3f03af0444e706f50b0c2c520284674f4091934f
parentc520ba7573a84bd37f8803a3beeb8f6f995bf9e1
smb: client: fix potential broken compound request

Now that smb2_compound_op() can accept up to 5 commands in a single
compound request, set the appropriate NextCommand and related flags to
all subsequent commands as well as handling the case where a valid
@cfile is passed and therefore skipping create and close requests in
the compound chain.

This fix a potential broken compound request that could be sent from
smb2_get_reparse_inode() if the client found a valid open
file (@cfile) prior to calling smb2_compound_op().

Signed-off-by: Paulo Alcantara <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smb2inode.c