Commit 3f3f6d61 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag '6.11-rc1-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - two reparse point fixes

 - minor cleanup

 - additional trace point (to help debug a recent problem)

* tag '6.11-rc1-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: update internal version number
  smb: client: fix FSCTL_GET_REPARSE_POINT against NetApp
  smb3: add dynamic tracepoints for shutdown ioctl
  cifs: Remove cifs_aio_ctx
  smb: client: handle lack of FSCTL_GET_REPARSE_POINT support
parents 3c41df42 a91bfa67
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -147,6 +147,6 @@ extern const struct export_operations cifs_export_ops;
#endif /* CONFIG_CIFS_NFSD_EXPORT */

/* when changing internal version - update following two lines at same time */
#define SMB3_PRODUCT_BUILD 49
#define CIFS_VERSION   "2.49"
#define SMB3_PRODUCT_BUILD 50
#define CIFS_VERSION   "2.50"
#endif				/* _CIFSFS_H */
+0 −24
Original line number Diff line number Diff line
@@ -1471,29 +1471,6 @@ struct cifs_io_parms {
	struct TCP_Server_Info *server;
};

struct cifs_aio_ctx {
	struct kref		refcount;
	struct list_head	list;
	struct mutex		aio_mutex;
	struct completion	done;
	struct iov_iter		iter;
	struct kiocb		*iocb;
	struct cifsFileInfo	*cfile;
	struct bio_vec		*bv;
	loff_t			pos;
	unsigned int		nr_pinned_pages;
	ssize_t			rc;
	unsigned int		len;
	unsigned int		total_len;
	unsigned int		bv_need_unpin;	/* If ->bv[] needs unpinning */
	bool			should_dirty;
	/*
	 * Indicates if this aio_ctx is for direct_io,
	 * If yes, iter is a copy of the user passed iov_iter
	 */
	bool			direct_io;
};

struct cifs_io_request {
	struct netfs_io_request		rreq;
	struct cifsFileInfo		*cfile;
@@ -2010,7 +1987,6 @@ require use of the stronger protocol */
 * cifsFileInfo->file_info_lock	cifsFileInfo->count		cifs_new_fileinfo
 *				->invalidHandle			initiate_cifs_search
 *				->oplock_break_cancelled
 * cifs_aio_ctx->aio_mutex		cifs_aio_ctx			cifs_aio_ctx_alloc
 ****************************************************************************/

#ifdef DECLARE_GLOBALS_HERE
+0 −2
Original line number Diff line number Diff line
@@ -619,8 +619,6 @@ int __cifs_calc_signature(struct smb_rqst *rqst,
			struct shash_desc *shash);
enum securityEnum cifs_select_sectype(struct TCP_Server_Info *,
					enum securityEnum);
struct cifs_aio_ctx *cifs_aio_ctx_alloc(void);
void cifs_aio_ctx_release(struct kref *refcount);

int cifs_alloc_hash(const char *name, struct shash_desc **sdesc);
void cifs_free_hash(struct shash_desc **sdesc);
+15 −2
Original line number Diff line number Diff line
@@ -1042,13 +1042,26 @@ static int reparse_info_to_fattr(struct cifs_open_info_data *data,
	}

	rc = -EOPNOTSUPP;
	switch ((data->reparse.tag = tag)) {
	case 0: /* SMB1 symlink */
	data->reparse.tag = tag;
	if (!data->reparse.tag) {
		if (server->ops->query_symlink) {
			rc = server->ops->query_symlink(xid, tcon,
							cifs_sb, full_path,
							&data->symlink_target);
		}
		if (rc == -EOPNOTSUPP)
			data->reparse.tag = IO_REPARSE_TAG_INTERNAL;
	}

	switch (data->reparse.tag) {
	case 0: /* SMB1 symlink */
		break;
	case IO_REPARSE_TAG_INTERNAL:
		rc = 0;
		if (le32_to_cpu(data->fi.Attributes) & ATTR_DIRECTORY) {
			cifs_create_junction_fattr(fattr, sb);
			goto out;
		}
		break;
	case IO_REPARSE_TAG_MOUNT_POINT:
		cifs_create_junction_fattr(fattr, sb);
+25 −7
Original line number Diff line number Diff line
@@ -170,7 +170,10 @@ static long smb_mnt_get_fsinfo(unsigned int xid, struct cifs_tcon *tcon,
static int cifs_shutdown(struct super_block *sb, unsigned long arg)
{
	struct cifs_sb_info *sbi = CIFS_SB(sb);
	struct tcon_link *tlink;
	struct cifs_tcon *tcon;
	__u32 flags;
	int rc;

	if (!capable(CAP_SYS_ADMIN))
		return -EPERM;
@@ -178,14 +181,21 @@ static int cifs_shutdown(struct super_block *sb, unsigned long arg)
	if (get_user(flags, (__u32 __user *)arg))
		return -EFAULT;

	if (flags > CIFS_GOING_FLAGS_NOLOGFLUSH)
		return -EINVAL;
	tlink = cifs_sb_tlink(sbi);
	if (IS_ERR(tlink))
		return PTR_ERR(tlink);
	tcon = tlink_tcon(tlink);

	trace_smb3_shutdown_enter(flags, tcon->tid);
	if (flags > CIFS_GOING_FLAGS_NOLOGFLUSH) {
		rc = -EINVAL;
		goto shutdown_out_err;
	}

	if (cifs_forced_shutdown(sbi))
		return 0;
		goto shutdown_good;

	cifs_dbg(VFS, "shut down requested (%d)", flags);
/*	trace_cifs_shutdown(sb, flags);*/

	/*
	 * see:
@@ -201,7 +211,8 @@ static int cifs_shutdown(struct super_block *sb, unsigned long arg)
	 */
	case CIFS_GOING_FLAGS_DEFAULT:
		cifs_dbg(FYI, "shutdown with default flag not supported\n");
		return -EINVAL;
		rc = -EINVAL;
		goto shutdown_out_err;
	/*
	 * FLAGS_LOGFLUSH is easy since it asks to write out metadata (not
	 * data) but metadata writes are not cached on the client, so can treat
@@ -210,11 +221,18 @@ static int cifs_shutdown(struct super_block *sb, unsigned long arg)
	case CIFS_GOING_FLAGS_LOGFLUSH:
	case CIFS_GOING_FLAGS_NOLOGFLUSH:
		sbi->mnt_cifs_flags |= CIFS_MOUNT_SHUTDOWN;
		return 0;
		goto shutdown_good;
	default:
		return -EINVAL;
		rc = -EINVAL;
		goto shutdown_out_err;
	}

shutdown_good:
	trace_smb3_shutdown_done(flags, tcon->tid);
	return 0;
shutdown_out_err:
	trace_smb3_shutdown_err(rc, flags, tcon->tid);
	return rc;
}

static int cifs_dump_full_key(struct cifs_tcon *tcon, struct smb3_full_key_debug_info __user *in)
Loading