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 tag '6.9-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

- Add missing trace point (noticed when debugging the recent mknod LSM
regression)

- fscache fix

* tag '6.9-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
cifs: Fix duplicate fscache cookie warnings
smb3: add trace event for mknod

+27 -2
+7
fs/smb/client/dir.c
··· 612 612 goto mknod_out; 613 613 } 614 614 615 + trace_smb3_mknod_enter(xid, tcon->ses->Suid, tcon->tid, full_path); 616 + 615 617 rc = tcon->ses->server->ops->make_node(xid, inode, direntry, tcon, 616 618 full_path, mode, 617 619 device_number); 618 620 619 621 mknod_out: 622 + if (rc) 623 + trace_smb3_mknod_err(xid, tcon->ses->Suid, tcon->tid, rc); 624 + else 625 + trace_smb3_mknod_done(xid, tcon->ses->Suid, tcon->tid); 626 + 620 627 free_dentry_path(page); 621 628 free_xid(xid); 622 629 cifs_put_tlink(tlink);
+15 -1
fs/smb/client/fscache.c
··· 12 12 #include "cifs_fs_sb.h" 13 13 #include "cifsproto.h" 14 14 15 + /* 16 + * Key for fscache inode. [!] Contents must match comparisons in cifs_find_inode(). 17 + */ 18 + struct cifs_fscache_inode_key { 19 + 20 + __le64 uniqueid; /* server inode number */ 21 + __le64 createtime; /* creation time on server */ 22 + u8 type; /* S_IFMT file type */ 23 + } __packed; 24 + 15 25 static void cifs_fscache_fill_volume_coherency( 16 26 struct cifs_tcon *tcon, 17 27 struct cifs_fscache_volume_coherency_data *cd) ··· 107 97 void cifs_fscache_get_inode_cookie(struct inode *inode) 108 98 { 109 99 struct cifs_fscache_inode_coherency_data cd; 100 + struct cifs_fscache_inode_key key; 110 101 struct cifsInodeInfo *cifsi = CIFS_I(inode); 111 102 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 112 103 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb); 113 104 105 + key.uniqueid = cpu_to_le64(cifsi->uniqueid); 106 + key.createtime = cpu_to_le64(cifsi->createtime); 107 + key.type = (inode->i_mode & S_IFMT) >> 12; 114 108 cifs_fscache_fill_coherency(&cifsi->netfs.inode, &cd); 115 109 116 110 cifsi->netfs.cache = 117 111 fscache_acquire_cookie(tcon->fscache, 0, 118 - &cifsi->uniqueid, sizeof(cifsi->uniqueid), 112 + &key, sizeof(key), 119 113 &cd, sizeof(cd), 120 114 i_size_read(&cifsi->netfs.inode)); 121 115 if (cifsi->netfs.cache)
+2
fs/smb/client/inode.c
··· 1351 1351 { 1352 1352 struct cifs_fattr *fattr = opaque; 1353 1353 1354 + /* [!] The compared values must be the same in struct cifs_fscache_inode_key. */ 1355 + 1354 1356 /* don't match inode with different uniqueid */ 1355 1357 if (CIFS_I(inode)->uniqueid != fattr->cf_uniqueid) 1356 1358 return 0;
+3 -1
fs/smb/client/trace.h
··· 375 375 DEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(delete_enter); 376 376 DEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(mkdir_enter); 377 377 DEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(tdis_enter); 378 + DEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(mknod_enter); 378 379 379 380 DECLARE_EVENT_CLASS(smb3_inf_compound_done_class, 380 381 TP_PROTO(unsigned int xid, ··· 416 415 DEFINE_SMB3_INF_COMPOUND_DONE_EVENT(delete_done); 417 416 DEFINE_SMB3_INF_COMPOUND_DONE_EVENT(mkdir_done); 418 417 DEFINE_SMB3_INF_COMPOUND_DONE_EVENT(tdis_done); 419 - 418 + DEFINE_SMB3_INF_COMPOUND_DONE_EVENT(mknod_done); 420 419 421 420 DECLARE_EVENT_CLASS(smb3_inf_compound_err_class, 422 421 TP_PROTO(unsigned int xid, ··· 462 461 DEFINE_SMB3_INF_COMPOUND_ERR_EVENT(mkdir_err); 463 462 DEFINE_SMB3_INF_COMPOUND_ERR_EVENT(delete_err); 464 463 DEFINE_SMB3_INF_COMPOUND_ERR_EVENT(tdis_err); 464 + DEFINE_SMB3_INF_COMPOUND_ERR_EVENT(mknod_err); 465 465 466 466 /* 467 467 * For logging SMB3 Status code and Command for responses which return errors