Skip to content

Commit f61c906

Browse files
committed
fs/9p: Eliminate now unused v9fs_get_inode
Now with all inode allocation going through get_from_fid functions we can remove v9fs_get_inode and reduce us down to a single inode allocation path. Signed-off-by: Eric Van Hensbergen <ericvh@kernel.org>
1 parent 2dc92e5 commit f61c906

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

fs/9p/v9fs_vfs.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ extern struct kmem_cache *v9fs_inode_cache;
4040

4141
struct inode *v9fs_alloc_inode(struct super_block *sb);
4242
void v9fs_free_inode(struct inode *inode);
43-
struct inode *v9fs_get_inode(struct super_block *sb, umode_t mode,
44-
dev_t rdev);
4543
void v9fs_set_netfs_context(struct inode *inode);
4644
int v9fs_init_inode(struct v9fs_session_info *v9ses,
4745
struct inode *inode, umode_t mode, dev_t rdev);

fs/9p/vfs_inode.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -331,36 +331,6 @@ int v9fs_init_inode(struct v9fs_session_info *v9ses,
331331

332332
}
333333

334-
/**
335-
* v9fs_get_inode - helper function to setup an inode
336-
* @sb: superblock
337-
* @mode: mode to setup inode with
338-
* @rdev: The device numbers to set
339-
*/
340-
341-
struct inode *v9fs_get_inode(struct super_block *sb, umode_t mode, dev_t rdev)
342-
{
343-
int err;
344-
struct inode *inode;
345-
struct v9fs_session_info *v9ses = sb->s_fs_info;
346-
347-
p9_debug(P9_DEBUG_VFS, "super block: %p mode: %ho\n", sb, mode);
348-
349-
inode = new_inode(sb);
350-
if (!inode) {
351-
pr_warn("%s (%d): Problem allocating inode\n",
352-
__func__, task_pid_nr(current));
353-
return ERR_PTR(-ENOMEM);
354-
}
355-
err = v9fs_init_inode(v9ses, inode, mode, rdev);
356-
if (err) {
357-
iput(inode);
358-
return ERR_PTR(err);
359-
}
360-
v9fs_set_netfs_context(inode);
361-
return inode;
362-
}
363-
364334
/**
365335
* v9fs_evict_inode - Remove an inode from the inode cache
366336
* @inode: inode to release

0 commit comments

Comments
 (0)