mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-04-13 09:59:31 +00:00
Mashed-up update that I sat on too long:
- fix for multiple slabs created with the same name - enable multipage folios - theorical fix to also look for opened fids by inode if none was found by dentry -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE/IPbcYBuWt0zoYhOq06b7GqY5nAFAmcS81AACgkQq06b7GqY 5nACpBAAtXOGRjg+dushCwUVKBlnI3oTwE2G+ywnphNZg2A0emlMOxos7x1OTiM3 Fu0b10MCUWHIXo4jD6ALVPWITJTfjiXR8s90Q/ozypcIXXhkDDShhV31b2h6Iplr YyKyjEehDFRiS7rqWC2a9mce99sOpwdQRmnssnWbjYvpJ4imFbl+50Z1I5Nc/Omu j2y02eMuikiWF/shKj0Dx1mmpZ4InSv3kvlM+V2D2YdWKNonGZe/xFZhid95LXmr Upt55R8k9qR2pn4VU22eKP6c34DIZGDlrcQdPUCNP5QuaAdGZov3TjNQdjE1bJmF E2QdxvUNfvvHqlvaRrlWa27uMgXMcy7QV3LEKwmo3tmaYVw2PDMRbFXc9zQdxy91 zqXjjGasnwzE8ca36y79vZjFTHAyY5VK/3cHCL3ai+ysu4UL3k2QgmVegREG/xKk G8Nz4UO/R6s8Wc2VqxKJdZS5NMLlADS+Aes0PG+9AxQz7iR9Ktgwrw39KDxMi+Lm PeH3Gz2rP9+EPoa3usoBQtvvvmJKM/Wb9qdPW9vTtRbRJ7bVclJoizFoLMA/TiW1 Jru+HYGBO75s8RynwEDLMiJhkjZWHfVgDjPsY6YsGVH8W2gOcJ7egQ2J2EsuurN3 tzKz4uQilV+VeDuWs8pWKrX/c3Y3KpSYV+oayg7Je7LoTlQBmU8= =VG4t -----END PGP SIGNATURE----- Merge tag '9p-for-6.12-rc4' of https://github.com/martinetd/linux Pull 9p fixes from Dominique Martinet: "Mashed-up update that I sat on too long: - fix for multiple slabs created with the same name - enable multipage folios - theorical fix to also look for opened fids by inode if none was found by dentry" [ Enabling multi-page folios should have been done during the merge window, but it's a one-liner, and the actual meat of the enablement is in netfs and already in use for other filesystems... - Linus ] * tag '9p-for-6.12-rc4' of https://github.com/martinetd/linux: 9p: Avoid creating multiple slab caches with the same name 9p: Enable multipage folios 9p: v9fs_fid_find: also lookup by inode if not found dentry
This commit is contained in:
commit
9197b73fd7
3 changed files with 12 additions and 4 deletions
|
@ -131,10 +131,9 @@ static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any)
|
|||
}
|
||||
}
|
||||
spin_unlock(&dentry->d_lock);
|
||||
} else {
|
||||
if (dentry->d_inode)
|
||||
ret = v9fs_fid_find_inode(dentry->d_inode, false, uid, any);
|
||||
}
|
||||
if (!ret && dentry->d_inode)
|
||||
ret = v9fs_fid_find_inode(dentry->d_inode, false, uid, any);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -295,6 +295,7 @@ int v9fs_init_inode(struct v9fs_session_info *v9ses,
|
|||
inode->i_op = &v9fs_file_inode_operations;
|
||||
inode->i_fop = &v9fs_file_operations;
|
||||
}
|
||||
mapping_set_large_folios(inode->i_mapping);
|
||||
|
||||
break;
|
||||
case S_IFLNK:
|
||||
|
|
|
@ -979,6 +979,7 @@ struct p9_client *p9_client_create(const char *dev_name, char *options)
|
|||
int err;
|
||||
struct p9_client *clnt;
|
||||
char *client_id;
|
||||
char *cache_name;
|
||||
|
||||
clnt = kmalloc(sizeof(*clnt), GFP_KERNEL);
|
||||
if (!clnt)
|
||||
|
@ -1035,15 +1036,22 @@ struct p9_client *p9_client_create(const char *dev_name, char *options)
|
|||
if (err)
|
||||
goto close_trans;
|
||||
|
||||
cache_name = kasprintf(GFP_KERNEL, "9p-fcall-cache-%s", dev_name);
|
||||
if (!cache_name) {
|
||||
err = -ENOMEM;
|
||||
goto close_trans;
|
||||
}
|
||||
|
||||
/* P9_HDRSZ + 4 is the smallest packet header we can have that is
|
||||
* followed by data accessed from userspace by read
|
||||
*/
|
||||
clnt->fcall_cache =
|
||||
kmem_cache_create_usercopy("9p-fcall-cache", clnt->msize,
|
||||
kmem_cache_create_usercopy(cache_name, clnt->msize,
|
||||
0, 0, P9_HDRSZ + 4,
|
||||
clnt->msize - (P9_HDRSZ + 4),
|
||||
NULL);
|
||||
|
||||
kfree(cache_name);
|
||||
return clnt;
|
||||
|
||||
close_trans:
|
||||
|
|
Loading…
Add table
Reference in a new issue