mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 21:15:53 +02:00
four cifs.ko client fixes
-----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAmbIqhgACgkQiiy9cAdy T1EAPgwAnW+vu15huT1zQn2BtFcn85zdBGXL/avjbbMLDwNHj5Lpae+PbbRa4gZ0 VN6OQdq5Rt3Z2pJDfFZtFECKq4AN1Lxn1ur4wujBIzez3CxyFCXjDeS5/3lRP6c+ 0CiHVtRe7IgncGUnnhvwPhiG6/cjTNiXlImb6SgmFLP/0U7ZnWl5p3LmR7exfVY9 Fubqq3HF0UpxMUD3thM055ftqT/xP6RdrITX2K2Led+BlJAJm1x+0E//4nApQ2IX C3VeBRZTvQtBC+pay754BqSnfAifgVObF8cfswDMS4U7ImV5gS+CxSx4vlg4bF7o 2f32mZAXz9U3yMIBMjtBT/q/LbN28SRSjo1x35CJ9LCUK6IzARHiLZG/PVltK3Cj copuH3n5ZV0nGVdsv10Uheo3euFlrKKylPn8xAEhMsQzG7Q6ek/pT+avb+xl6MWf i8eOnMobCFiOEJtSk/uV23579wf8maVQM92M2rf2UO6K5eHIceOq0HGfSoeVV9dZ 1rgZb1D6 =8U5O -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
66ace9a8f9
|
|
@ -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 */
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -588,6 +588,7 @@ cifs_symlink(struct mnt_idmap *idmap, struct inode *inode,
|
|||
tlink = cifs_sb_tlink(cifs_sb);
|
||||
if (IS_ERR(tlink)) {
|
||||
rc = PTR_ERR(tlink);
|
||||
/* BB could be clearer if skipped put_tlink on error here, but harmless */
|
||||
goto symlink_exit;
|
||||
}
|
||||
pTcon = tlink_tcon(tlink);
|
||||
|
|
|
|||
|
|
@ -378,6 +378,8 @@ int parse_reparse_point(struct reparse_data_buffer *buf,
|
|||
u32 plen, struct cifs_sb_info *cifs_sb,
|
||||
bool unicode, struct cifs_open_info_data *data)
|
||||
{
|
||||
struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
|
||||
|
||||
data->reparse.buf = buf;
|
||||
|
||||
/* See MS-FSCC 2.1.2 */
|
||||
|
|
@ -394,12 +396,13 @@ int parse_reparse_point(struct reparse_data_buffer *buf,
|
|||
case IO_REPARSE_TAG_LX_FIFO:
|
||||
case IO_REPARSE_TAG_LX_CHR:
|
||||
case IO_REPARSE_TAG_LX_BLK:
|
||||
return 0;
|
||||
break;
|
||||
default:
|
||||
cifs_dbg(VFS, "%s: unhandled reparse tag: 0x%08x\n",
|
||||
__func__, le32_to_cpu(buf->ReparseTag));
|
||||
return -EOPNOTSUPP;
|
||||
cifs_tcon_dbg(VFS | ONCE, "unhandled reparse tag: 0x%08x\n",
|
||||
le32_to_cpu(buf->ReparseTag));
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int smb2_parse_reparse_point(struct cifs_sb_info *cifs_sb,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user