Commit 645c248d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag '5.7-rc-smb3-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs updates from Steve French:
 "First part of cifs/smb3 changes for merge window (others are still
  being tested). Various RDMA (smbdirect) fixes, addition of SMB3.1.1
  POSIX support in readdir, 3 fixes for stable, and a fix for flock.

  Summary:

  New feature:
   - SMB3.1.1 POSIX support in readdir

  Fixes:
   - various RDMA (smbdirect) fixes
   - fix for flock
   - fallocate fix
   - some improved mount warnings
   - two timestamp related fixes
   - reconnect fix
   - three fixes for stable"

* tag '5.7-rc-smb3-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6: (28 commits)
  cifs: update internal module version number
  cifs: Allocate encryption header through kmalloc
  cifs: smbd: Check and extend sender credits in interrupt context
  cifs: smbd: Calculate the correct maximum packet size for segmented SMBDirect send/receive
  smb3: use SMB2_SIGNATURE_SIZE define
  CIFS: Fix bug which the return value by asynchronous read is error
  CIFS: check new file size when extending file by fallocate
  SMB3: Minor cleanup of protocol definitions
  SMB3: Additional compression structures
  SMB3: Add new compression flags
  cifs: smb2pdu.h: Replace zero-length array with flexible-array member
  cifs: clear PF_MEMALLOC before exiting demultiplex thread
  cifs: cifspdu.h: Replace zero-length array with flexible-array member
  CIFS: Warn less noisily on default mount
  fs/cifs: fix gcc warning in sid_to_id
  cifs: allow unlock flock and OFD lock across fork
  cifs: do d_move in rename
  cifs: add SMB2_open() arg to return POSIX data
  cifs: plumb smb2 POSIX dir enumeration
  cifs: add smb2 POSIX info level
  ...
parents 018d21f5 f460c502
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -342,7 +342,7 @@ static int
sid_to_id(struct cifs_sb_info *cifs_sb, struct cifs_sid *psid,
		struct cifs_fattr *fattr, uint sidtype)
{
	int rc;
	int rc = 0;
	struct key *sidkey;
	char *sidstr;
	const struct cred *saved_cred;
@@ -450,11 +450,12 @@ out_revert_creds:
	 * fails then we just fall back to using the mnt_uid/mnt_gid.
	 */
got_valid_id:
	rc = 0;
	if (sidtype == SIDOWNER)
		fattr->cf_uid = fuid;
	else
		fattr->cf_gid = fgid;
	return 0;
	return rc;
}

int
+2 −2
Original line number Diff line number Diff line
@@ -1018,7 +1018,7 @@ struct file_system_type cifs_fs_type = {
	.name = "cifs",
	.mount = cifs_do_mount,
	.kill_sb = cifs_kill_sb,
	/*  .fs_flags */
	.fs_flags = FS_RENAME_DOES_D_MOVE,
};
MODULE_ALIAS_FS("cifs");

@@ -1027,7 +1027,7 @@ static struct file_system_type smb3_fs_type = {
	.name = "smb3",
	.mount = smb3_do_mount,
	.kill_sb = cifs_kill_sb,
	/*  .fs_flags */
	.fs_flags = FS_RENAME_DOES_D_MOVE,
};
MODULE_ALIAS_FS("smb3");
MODULE_ALIAS("smb3");
+1 −1
Original line number Diff line number Diff line
@@ -156,5 +156,5 @@ extern int cifs_truncate_page(struct address_space *mapping, loff_t from);
extern const struct export_operations cifs_export_ops;
#endif /* CONFIG_CIFS_NFSD_EXPORT */

#define CIFS_VERSION   "2.25"
#define CIFS_VERSION   "2.26"
#endif				/* _CIFSFS_H */
+10 −9
Original line number Diff line number Diff line
@@ -1021,7 +1021,7 @@ typedef struct smb_com_writex_req {
	__le16 ByteCount;
	__u8 Pad;		/* BB check for whether padded to DWORD
				   boundary and optimum performance here */
	char Data[0];
	char Data[];
} __attribute__((packed)) WRITEX_REQ;

typedef struct smb_com_write_req {
@@ -1041,7 +1041,7 @@ typedef struct smb_com_write_req {
	__le16 ByteCount;
	__u8 Pad;		/* BB check for whether padded to DWORD
				   boundary and optimum performance here */
	char Data[0];
	char Data[];
} __attribute__((packed)) WRITE_REQ;

typedef struct smb_com_write_rsp {
@@ -1306,7 +1306,7 @@ typedef struct smb_com_ntransact_req {
	/* SetupCount words follow then */
	__le16 ByteCount;
	__u8 Pad[3];
	__u8 Parms[0];
	__u8 Parms[];
} __attribute__((packed)) NTRANSACT_REQ;

typedef struct smb_com_ntransact_rsp {
@@ -1523,7 +1523,7 @@ struct file_notify_information {
	__le32 NextEntryOffset;
	__le32 Action;
	__le32 FileNameLength;
	__u8  FileName[0];
	__u8  FileName[];
} __attribute__((packed));

/* For IO_REPARSE_TAG_SYMLINK */
@@ -1536,7 +1536,7 @@ struct reparse_symlink_data {
	__le16	PrintNameOffset;
	__le16	PrintNameLength;
	__le32	Flags;
	char	PathBuffer[0];
	char	PathBuffer[];
} __attribute__((packed));

/* Flag above */
@@ -1553,7 +1553,7 @@ struct reparse_posix_data {
	__le16	ReparseDataLength;
	__u16	Reserved;
	__le64	InodeType; /* LNK, FIFO, CHR etc. */
	char	PathBuffer[0];
	char	PathBuffer[];
} __attribute__((packed));

struct cifs_quota_data {
@@ -1691,6 +1691,7 @@ struct smb_t2_rsp {
#define SMB_FIND_FILE_ID_FULL_DIR_INFO    0x105
#define SMB_FIND_FILE_ID_BOTH_DIR_INFO    0x106
#define SMB_FIND_FILE_UNIX                0x202
#define SMB_FIND_FILE_POSIX_INFO          0x064

typedef struct smb_com_transaction2_qpi_req {
	struct smb_hdr hdr;	/* wct = 14+ */
@@ -1761,7 +1762,7 @@ struct set_file_rename {
	__le32 overwrite;   /* 1 = overwrite dest */
	__u32 root_fid;   /* zero */
	__le32 target_name_len;
	char  target_name[0];  /* Must be unicode */
	char  target_name[];  /* Must be unicode */
} __attribute__((packed));

struct smb_com_transaction2_sfi_req {
@@ -2450,7 +2451,7 @@ struct cifs_posix_acl { /* access conrol list (ACL) */
	__le16	version;
	__le16	access_entry_count;  /* access ACL - count of entries */
	__le16	default_entry_count; /* default ACL - count of entries */
	struct cifs_posix_ace ace_array[0];
	struct cifs_posix_ace ace_array[];
	/* followed by
	struct cifs_posix_ace default_ace_arraay[] */
} __attribute__((packed));  /* level 0x204 */
@@ -2756,7 +2757,7 @@ typedef struct file_xattr_info {
	/* BB do we need another field for flags? BB */
	__u32 xattr_name_len;
	__u32 xattr_value_len;
	char  xattr_name[0];
	char  xattr_name[];
	/* followed by xattr_value[xattr_value_len], no pad */
} __attribute__((packed)) FILE_XATTR_INFO; /* extended attribute info
					      level 0x205 */
+5 −0
Original line number Diff line number Diff line
@@ -602,6 +602,11 @@ int smb2_parse_query_directory(struct cifs_tcon *tcon, struct kvec *rsp_iov,
			       int resp_buftype,
			       struct cifs_search_info *srch_inf);

struct super_block *cifs_get_tcp_super(struct TCP_Server_Info *server);
void cifs_put_tcp_super(struct super_block *sb);
int update_super_prepath(struct cifs_tcon *tcon, const char *prefix,
			 size_t prefix_len);

#ifdef CONFIG_CIFS_DFS_UPCALL
static inline int get_dfs_path(const unsigned int xid, struct cifs_ses *ses,
			       const char *old_path,
Loading