Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6

Pull CIFS fixes from Steve French:
"Three small CIFS Fixes (the most important of the three fixes a recent
problem authenticating to Windows 8 using cifs rather than SMB2)"

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
cifs: ignore everything in SPNEGO blob after mechTypes
cifs: delay super block destruction until all cifsFileInfo objects are gone
cifs: map NT_STATUS_SHARING_VIOLATION to EBUSY instead of ETXTBSY

+43 -56
+5 -48
fs/cifs/asn1.c
··· 614 614 } 615 615 } 616 616 617 - /* mechlistMIC */ 618 - if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { 619 - /* Check if we have reached the end of the blob, but with 620 - no mechListMic (e.g. NTLMSSP instead of KRB5) */ 621 - if (ctx.error == ASN1_ERR_DEC_EMPTY) 622 - goto decode_negtoken_exit; 623 - cFYI(1, "Error decoding last part negTokenInit exit3"); 624 - return 0; 625 - } else if ((cls != ASN1_CTX) || (con != ASN1_CON)) { 626 - /* tag = 3 indicating mechListMIC */ 627 - cFYI(1, "Exit 4 cls = %d con = %d tag = %d end = %p (%d)", 628 - cls, con, tag, end, *end); 629 - return 0; 630 - } 631 - 632 - /* sequence */ 633 - if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { 634 - cFYI(1, "Error decoding last part negTokenInit exit5"); 635 - return 0; 636 - } else if ((cls != ASN1_UNI) || (con != ASN1_CON) 637 - || (tag != ASN1_SEQ)) { 638 - cFYI(1, "cls = %d con = %d tag = %d end = %p (%d)", 639 - cls, con, tag, end, *end); 640 - } 641 - 642 - /* sequence of */ 643 - if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { 644 - cFYI(1, "Error decoding last part negTokenInit exit 7"); 645 - return 0; 646 - } else if ((cls != ASN1_CTX) || (con != ASN1_CON)) { 647 - cFYI(1, "Exit 8 cls = %d con = %d tag = %d end = %p (%d)", 648 - cls, con, tag, end, *end); 649 - return 0; 650 - } 651 - 652 - /* general string */ 653 - if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { 654 - cFYI(1, "Error decoding last part negTokenInit exit9"); 655 - return 0; 656 - } else if ((cls != ASN1_UNI) || (con != ASN1_PRI) 657 - || (tag != ASN1_GENSTR)) { 658 - cFYI(1, "Exit10 cls = %d con = %d tag = %d end = %p (%d)", 659 - cls, con, tag, end, *end); 660 - return 0; 661 - } 662 - cFYI(1, "Need to call asn1_octets_decode() function for %s", 663 - ctx.pointer); /* is this UTF-8 or ASCII? */ 664 - decode_negtoken_exit: 617 + /* 618 + * We currently ignore anything at the end of the SPNEGO blob after 619 + * the mechTypes have been parsed, since none of that info is 620 + * used at the moment. 621 + */ 665 622 return 1; 666 623 }
+24
fs/cifs/cifsfs.c
··· 91 91 __u8 cifs_client_guid[SMB2_CLIENT_GUID_SIZE]; 92 92 #endif 93 93 94 + /* 95 + * Bumps refcount for cifs super block. 96 + * Note that it should be only called if a referece to VFS super block is 97 + * already held, e.g. in open-type syscalls context. Otherwise it can race with 98 + * atomic_dec_and_test in deactivate_locked_super. 99 + */ 100 + void 101 + cifs_sb_active(struct super_block *sb) 102 + { 103 + struct cifs_sb_info *server = CIFS_SB(sb); 104 + 105 + if (atomic_inc_return(&server->active) == 1) 106 + atomic_inc(&sb->s_active); 107 + } 108 + 109 + void 110 + cifs_sb_deactive(struct super_block *sb) 111 + { 112 + struct cifs_sb_info *server = CIFS_SB(sb); 113 + 114 + if (atomic_dec_and_test(&server->active)) 115 + deactivate_super(sb); 116 + } 117 + 94 118 static int 95 119 cifs_read_super(struct super_block *sb) 96 120 {
+4
fs/cifs/cifsfs.h
··· 41 41 extern const struct address_space_operations cifs_addr_ops; 42 42 extern const struct address_space_operations cifs_addr_ops_smallbuf; 43 43 44 + /* Functions related to super block operations */ 45 + extern void cifs_sb_active(struct super_block *sb); 46 + extern void cifs_sb_deactive(struct super_block *sb); 47 + 44 48 /* Functions related to inodes */ 45 49 extern const struct inode_operations cifs_dir_inode_ops; 46 50 extern struct inode *cifs_root_iget(struct super_block *);
+5 -1
fs/cifs/file.c
··· 300 300 INIT_WORK(&cfile->oplock_break, cifs_oplock_break); 301 301 mutex_init(&cfile->fh_mutex); 302 302 303 + cifs_sb_active(inode->i_sb); 304 + 303 305 /* 304 306 * If the server returned a read oplock and we have mandatory brlocks, 305 307 * set oplock level to None. ··· 351 349 struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink); 352 350 struct TCP_Server_Info *server = tcon->ses->server; 353 351 struct cifsInodeInfo *cifsi = CIFS_I(inode); 354 - struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 352 + struct super_block *sb = inode->i_sb; 353 + struct cifs_sb_info *cifs_sb = CIFS_SB(sb); 355 354 struct cifsLockInfo *li, *tmp; 356 355 struct cifs_fid fid; 357 356 struct cifs_pending_open open; ··· 417 414 418 415 cifs_put_tlink(cifs_file->tlink); 419 416 dput(cifs_file->dentry); 417 + cifs_sb_deactive(sb); 420 418 kfree(cifs_file); 421 419 } 422 420
+4 -6
fs/cifs/inode.c
··· 1043 1043 cifs_sb->mnt_cifs_flags & 1044 1044 CIFS_MOUNT_MAP_SPECIAL_CHR); 1045 1045 if (rc != 0) { 1046 - rc = -ETXTBSY; 1046 + rc = -EBUSY; 1047 1047 goto undo_setattr; 1048 1048 } 1049 1049 ··· 1062 1062 if (rc == -ENOENT) 1063 1063 rc = 0; 1064 1064 else if (rc != 0) { 1065 - rc = -ETXTBSY; 1065 + rc = -EBUSY; 1066 1066 goto undo_rename; 1067 1067 } 1068 1068 cifsInode->delete_pending = true; ··· 1169 1169 cifs_drop_nlink(inode); 1170 1170 } else if (rc == -ENOENT) { 1171 1171 d_drop(dentry); 1172 - } else if (rc == -ETXTBSY) { 1172 + } else if (rc == -EBUSY) { 1173 1173 if (server->ops->rename_pending_delete) { 1174 1174 rc = server->ops->rename_pending_delete(full_path, 1175 1175 dentry, xid); 1176 1176 if (rc == 0) 1177 1177 cifs_drop_nlink(inode); 1178 1178 } 1179 - if (rc == -ETXTBSY) 1180 - rc = -EBUSY; 1181 1179 } else if ((rc == -EACCES) && (dosattr == 0) && inode) { 1182 1180 attrs = kzalloc(sizeof(*attrs), GFP_KERNEL); 1183 1181 if (attrs == NULL) { ··· 1516 1518 * source. Note that cross directory moves do not work with 1517 1519 * rename by filehandle to various Windows servers. 1518 1520 */ 1519 - if (rc == 0 || rc != -ETXTBSY) 1521 + if (rc == 0 || rc != -EBUSY) 1520 1522 goto do_rename_exit; 1521 1523 1522 1524 /* open-file renames don't work across directories */
+1 -1
fs/cifs/netmisc.c
··· 62 62 {ERRdiffdevice, -EXDEV}, 63 63 {ERRnofiles, -ENOENT}, 64 64 {ERRwriteprot, -EROFS}, 65 - {ERRbadshare, -ETXTBSY}, 65 + {ERRbadshare, -EBUSY}, 66 66 {ERRlock, -EACCES}, 67 67 {ERRunsup, -EINVAL}, 68 68 {ERRnosuchshare, -ENXIO},