Skip to content

Commit 9197b73

Browse files
committed
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
2 parents 4e6bd4a + 79efeba commit 9197b73

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

fs/9p/fid.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,9 @@ static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any)
131131
}
132132
}
133133
spin_unlock(&dentry->d_lock);
134-
} else {
135-
if (dentry->d_inode)
136-
ret = v9fs_fid_find_inode(dentry->d_inode, false, uid, any);
137134
}
135+
if (!ret && dentry->d_inode)
136+
ret = v9fs_fid_find_inode(dentry->d_inode, false, uid, any);
138137

139138
return ret;
140139
}

fs/9p/vfs_inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ int v9fs_init_inode(struct v9fs_session_info *v9ses,
295295
inode->i_op = &v9fs_file_inode_operations;
296296
inode->i_fop = &v9fs_file_operations;
297297
}
298+
mapping_set_large_folios(inode->i_mapping);
298299

299300
break;
300301
case S_IFLNK:

net/9p/client.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,7 @@ struct p9_client *p9_client_create(const char *dev_name, char *options)
979979
int err;
980980
struct p9_client *clnt;
981981
char *client_id;
982+
char *cache_name;
982983

983984
clnt = kmalloc(sizeof(*clnt), GFP_KERNEL);
984985
if (!clnt)
@@ -1035,15 +1036,22 @@ struct p9_client *p9_client_create(const char *dev_name, char *options)
10351036
if (err)
10361037
goto close_trans;
10371038

1039+
cache_name = kasprintf(GFP_KERNEL, "9p-fcall-cache-%s", dev_name);
1040+
if (!cache_name) {
1041+
err = -ENOMEM;
1042+
goto close_trans;
1043+
}
1044+
10381045
/* P9_HDRSZ + 4 is the smallest packet header we can have that is
10391046
* followed by data accessed from userspace by read
10401047
*/
10411048
clnt->fcall_cache =
1042-
kmem_cache_create_usercopy("9p-fcall-cache", clnt->msize,
1049+
kmem_cache_create_usercopy(cache_name, clnt->msize,
10431050
0, 0, P9_HDRSZ + 4,
10441051
clnt->msize - (P9_HDRSZ + 4),
10451052
NULL);
10461053

1054+
kfree(cache_name);
10471055
return clnt;
10481056

10491057
close_trans:

0 commit comments

Comments
 (0)