Skip to content

Commit 83fb8ab

Browse files
vlendecsmfrench
authored andcommitted
cifs: Add "extbuf" and "extbuflen" args to smb2_compound_op()
Will carry the variable-sized reply from SMB_FIND_FILE_POSIX_INFO Signed-off-by: Volker Lendecke <[email protected]> Reviewed-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 0bf5882 commit 83fb8ab

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

fs/cifs/smb2inode.c

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ static int smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
5959
struct cifs_sb_info *cifs_sb, const char *full_path,
6060
__u32 desired_access, __u32 create_disposition, __u32 create_options,
6161
umode_t mode, void *ptr, int command, struct cifsFileInfo *cfile,
62+
__u8 **extbuf, size_t *extbuflen,
6263
struct kvec *err_iov, int *err_buftype)
6364
{
6465
struct cop_vars *vars = NULL;
@@ -539,7 +540,7 @@ int smb2_query_path_info(const unsigned int xid, struct cifs_tcon *tcon,
539540
cifs_get_readable_path(tcon, full_path, &cfile);
540541
rc = smb2_compound_op(xid, tcon, cifs_sb, full_path, FILE_READ_ATTRIBUTES, FILE_OPEN,
541542
create_options, ACL_NO_MODE, data, SMB2_OP_QUERY_INFO, cfile,
542-
err_iov, err_buftype);
543+
NULL, NULL, err_iov, err_buftype);
543544
if (rc == -EOPNOTSUPP) {
544545
if (err_iov[0].iov_base && err_buftype[0] != CIFS_NO_BUFFER &&
545546
((struct smb2_hdr *)err_iov[0].iov_base)->Command == SMB2_CREATE &&
@@ -555,7 +556,7 @@ int smb2_query_path_info(const unsigned int xid, struct cifs_tcon *tcon,
555556
cifs_get_readable_path(tcon, full_path, &cfile);
556557
rc = smb2_compound_op(xid, tcon, cifs_sb, full_path, FILE_READ_ATTRIBUTES,
557558
FILE_OPEN, create_options, ACL_NO_MODE, data,
558-
SMB2_OP_QUERY_INFO, cfile, NULL, NULL);
559+
SMB2_OP_QUERY_INFO, cfile, NULL, NULL, NULL, NULL);
559560
}
560561

561562
out:
@@ -589,7 +590,7 @@ int smb311_posix_query_path_info(const unsigned int xid, struct cifs_tcon *tcon,
589590
cifs_get_readable_path(tcon, full_path, &cfile);
590591
rc = smb2_compound_op(xid, tcon, cifs_sb, full_path, FILE_READ_ATTRIBUTES, FILE_OPEN,
591592
create_options, ACL_NO_MODE, data, SMB2_OP_POSIX_QUERY_INFO, cfile,
592-
err_iov, err_buftype);
593+
NULL, NULL, err_iov, err_buftype);
593594
if (rc == -EOPNOTSUPP) {
594595
/* BB TODO: When support for special files added to Samba re-verify this path */
595596
if (err_iov[0].iov_base && err_buftype[0] != CIFS_NO_BUFFER &&
@@ -606,7 +607,7 @@ int smb311_posix_query_path_info(const unsigned int xid, struct cifs_tcon *tcon,
606607
cifs_get_readable_path(tcon, full_path, &cfile);
607608
rc = smb2_compound_op(xid, tcon, cifs_sb, full_path, FILE_READ_ATTRIBUTES,
608609
FILE_OPEN, create_options, ACL_NO_MODE, data,
609-
SMB2_OP_POSIX_QUERY_INFO, cfile, NULL, NULL);
610+
SMB2_OP_POSIX_QUERY_INFO, cfile, NULL, NULL, NULL, NULL);
610611
}
611612

612613
out:
@@ -624,7 +625,7 @@ smb2_mkdir(const unsigned int xid, struct inode *parent_inode, umode_t mode,
624625
return smb2_compound_op(xid, tcon, cifs_sb, name,
625626
FILE_WRITE_ATTRIBUTES, FILE_CREATE,
626627
CREATE_NOT_FILE, mode, NULL, SMB2_OP_MKDIR,
627-
NULL, NULL, NULL);
628+
NULL, NULL, NULL, NULL, NULL);
628629
}
629630

630631
void
@@ -646,7 +647,7 @@ smb2_mkdir_setinfo(struct inode *inode, const char *name,
646647
tmprc = smb2_compound_op(xid, tcon, cifs_sb, name,
647648
FILE_WRITE_ATTRIBUTES, FILE_CREATE,
648649
CREATE_NOT_FILE, ACL_NO_MODE,
649-
&data, SMB2_OP_SET_INFO, cfile, NULL, NULL);
650+
&data, SMB2_OP_SET_INFO, cfile, NULL, NULL, NULL, NULL);
650651
if (tmprc == 0)
651652
cifs_i->cifsAttrs = dosattrs;
652653
}
@@ -658,7 +659,7 @@ smb2_rmdir(const unsigned int xid, struct cifs_tcon *tcon, const char *name,
658659
drop_cached_dir_by_name(xid, tcon, name, cifs_sb);
659660
return smb2_compound_op(xid, tcon, cifs_sb, name, DELETE, FILE_OPEN,
660661
CREATE_NOT_FILE, ACL_NO_MODE,
661-
NULL, SMB2_OP_RMDIR, NULL, NULL, NULL);
662+
NULL, SMB2_OP_RMDIR, NULL, NULL, NULL, NULL, NULL);
662663
}
663664

664665
int
@@ -667,7 +668,7 @@ smb2_unlink(const unsigned int xid, struct cifs_tcon *tcon, const char *name,
667668
{
668669
return smb2_compound_op(xid, tcon, cifs_sb, name, DELETE, FILE_OPEN,
669670
CREATE_DELETE_ON_CLOSE | OPEN_REPARSE_POINT,
670-
ACL_NO_MODE, NULL, SMB2_OP_DELETE, NULL, NULL, NULL);
671+
ACL_NO_MODE, NULL, SMB2_OP_DELETE, NULL, NULL, NULL, NULL, NULL);
671672
}
672673

673674
static int
@@ -686,7 +687,7 @@ smb2_set_path_attr(const unsigned int xid, struct cifs_tcon *tcon,
686687
}
687688
rc = smb2_compound_op(xid, tcon, cifs_sb, from_name, access,
688689
FILE_OPEN, 0, ACL_NO_MODE, smb2_to_name,
689-
command, cfile, NULL, NULL);
690+
command, cfile, NULL, NULL, NULL, NULL);
690691
smb2_rename_path:
691692
kfree(smb2_to_name);
692693
return rc;
@@ -727,7 +728,7 @@ smb2_set_path_size(const unsigned int xid, struct cifs_tcon *tcon,
727728
cifs_get_writable_path(tcon, full_path, FIND_WR_ANY, &cfile);
728729
return smb2_compound_op(xid, tcon, cifs_sb, full_path,
729730
FILE_WRITE_DATA, FILE_OPEN, 0, ACL_NO_MODE,
730-
&eof, SMB2_OP_SET_EOF, cfile, NULL, NULL);
731+
&eof, SMB2_OP_SET_EOF, cfile, NULL, NULL, NULL, NULL);
731732
}
732733

733734
int
@@ -754,7 +755,7 @@ smb2_set_file_info(struct inode *inode, const char *full_path,
754755
rc = smb2_compound_op(xid, tcon, cifs_sb, full_path,
755756
FILE_WRITE_ATTRIBUTES, FILE_OPEN,
756757
0, ACL_NO_MODE, buf, SMB2_OP_SET_INFO, cfile,
757-
NULL, NULL);
758+
NULL, NULL, NULL, NULL);
758759
cifs_put_tlink(tlink);
759760
return rc;
760761
}

0 commit comments

Comments
 (0)