Merge tag 'for-linus-5.16-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux
Pull orangefs fixes from Mike Marshall: - fix sb refcount leak when allocate sb info failed (Chenyuan Mi) - fix error return code of orangefs_revalidate_lookup() (Jia-Ju Bai) - remove redundant initialization of variable ret (Colin Ian King) * tag 'for-linus-5.16-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: Fix sb refcount leak when allocate sb info failed. fs: orangefs: fix error return code of orangefs_revalidate_lookup() orangefs: Remove redundant initialization of variable ret
This commit is contained in:
@@ -26,8 +26,10 @@ static int orangefs_revalidate_lookup(struct dentry *dentry)
|
||||
gossip_debug(GOSSIP_DCACHE_DEBUG, "%s: attempting lookup.\n", __func__);
|
||||
|
||||
new_op = op_alloc(ORANGEFS_VFS_OP_LOOKUP);
|
||||
if (!new_op)
|
||||
if (!new_op) {
|
||||
ret = -ENOMEM;
|
||||
goto out_put_parent;
|
||||
}
|
||||
|
||||
new_op->upcall.req.lookup.sym_follow = ORANGEFS_LOOKUP_LINK_NO_FOLLOW;
|
||||
new_op->upcall.req.lookup.parent_refn = parent->refn;
|
||||
|
||||
@@ -476,7 +476,7 @@ struct dentry *orangefs_mount(struct file_system_type *fst,
|
||||
const char *devname,
|
||||
void *data)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
int ret;
|
||||
struct super_block *sb = ERR_PTR(-EINVAL);
|
||||
struct orangefs_kernel_op_s *new_op;
|
||||
struct dentry *d = ERR_PTR(-EINVAL);
|
||||
@@ -527,7 +527,7 @@ struct dentry *orangefs_mount(struct file_system_type *fst,
|
||||
sb->s_fs_info = kzalloc(sizeof(struct orangefs_sb_info_s), GFP_KERNEL);
|
||||
if (!ORANGEFS_SB(sb)) {
|
||||
d = ERR_PTR(-ENOMEM);
|
||||
goto free_op;
|
||||
goto free_sb_and_op;
|
||||
}
|
||||
|
||||
ret = orangefs_fill_sb(sb,
|
||||
|
||||
Reference in New Issue
Block a user