Commit 66ace9a8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'v6.11-rc4-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - fix refcount leak (can cause rmmod fail)

 - fix byte range locking problem with cached reads

 - fix for mount failure if reparse point unrecognized

 - minor typo

* tag 'v6.11-rc4-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  smb/client: fix typo: GlobalMid_Sem -> GlobalMid_Lock
  smb: client: ignore unhandled reparse tags
  smb3: fix problem unloading module due to leaked refcount on shutdown
  smb3: fix broken cached reads when posix locks
parents 7eb61cc6 5e51224d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -75,9 +75,9 @@ unsigned int sign_CIFS_PDUs = 1;
/*
 * Global transaction id (XID) information
 */
unsigned int GlobalCurrentXid;	/* protected by GlobalMid_Sem */
unsigned int GlobalTotalActiveXid; /* prot by GlobalMid_Sem */
unsigned int GlobalMaxActiveXid;	/* prot by GlobalMid_Sem */
unsigned int GlobalCurrentXid;	/* protected by GlobalMid_Lock */
unsigned int GlobalTotalActiveXid; /* prot by GlobalMid_Lock */
unsigned int GlobalMaxActiveXid;	/* prot by GlobalMid_Lock */
spinlock_t GlobalMid_Lock; /* protects above & list operations on midQ entries */

/*
+3 −3
Original line number Diff line number Diff line
@@ -2017,9 +2017,9 @@ extern spinlock_t cifs_tcp_ses_lock;
/*
 * Global transaction id (XID) information
 */
extern unsigned int GlobalCurrentXid;	/* protected by GlobalMid_Sem */
extern unsigned int GlobalTotalActiveXid; /* prot by GlobalMid_Sem */
extern unsigned int GlobalMaxActiveXid;	/* prot by GlobalMid_Sem */
extern unsigned int GlobalCurrentXid;	/* protected by GlobalMid_Lock */
extern unsigned int GlobalTotalActiveXid; /* prot by GlobalMid_Lock */
extern unsigned int GlobalMaxActiveXid;	/* prot by GlobalMid_Lock */
extern spinlock_t GlobalMid_Lock; /* protects above & list operations on midQ entries */

/*
+3 −0
Original line number Diff line number Diff line
@@ -4194,6 +4194,9 @@ tlink_rb_insert(struct rb_root *root, struct tcon_link *new_tlink)
 *
 * If one doesn't exist then insert a new tcon_link struct into the tree and
 * try to construct a new one.
 *
 * REMEMBER to call cifs_put_tlink() after successful calls to cifs_sb_tlink,
 * to avoid refcount issues
 */
struct tcon_link *
cifs_sb_tlink(struct cifs_sb_info *cifs_sb)
+1 −3
Original line number Diff line number Diff line
@@ -2912,9 +2912,7 @@ cifs_strict_readv(struct kiocb *iocb, struct iov_iter *to)
	if (!CIFS_CACHE_READ(cinode))
		return netfs_unbuffered_read_iter(iocb, to);

	if (cap_unix(tcon->ses) &&
	    (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) &&
	    ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOPOSIXBRL) == 0)) {
	if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOPOSIXBRL) == 0) {
		if (iocb->ki_flags & IOCB_DIRECT)
			return netfs_unbuffered_read_iter(iocb, to);
		return netfs_buffered_read_iter(iocb, to);
+2 −0
Original line number Diff line number Diff line
@@ -229,9 +229,11 @@ static int cifs_shutdown(struct super_block *sb, unsigned long arg)

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

Loading