Skip to content

Commit a0c7d4a

Browse files
committed
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
2 parents f89ce84 + ac2c637 commit a0c7d4a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

fs/orangefs/dcache.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ static int orangefs_revalidate_lookup(struct dentry *dentry)
2626
gossip_debug(GOSSIP_DCACHE_DEBUG, "%s: attempting lookup.\n", __func__);
2727

2828
new_op = op_alloc(ORANGEFS_VFS_OP_LOOKUP);
29-
if (!new_op)
29+
if (!new_op) {
30+
ret = -ENOMEM;
3031
goto out_put_parent;
32+
}
3133

3234
new_op->upcall.req.lookup.sym_follow = ORANGEFS_LOOKUP_LINK_NO_FOLLOW;
3335
new_op->upcall.req.lookup.parent_refn = parent->refn;

fs/orangefs/super.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ struct dentry *orangefs_mount(struct file_system_type *fst,
476476
const char *devname,
477477
void *data)
478478
{
479-
int ret = -EINVAL;
479+
int ret;
480480
struct super_block *sb = ERR_PTR(-EINVAL);
481481
struct orangefs_kernel_op_s *new_op;
482482
struct dentry *d = ERR_PTR(-EINVAL);
@@ -527,7 +527,7 @@ struct dentry *orangefs_mount(struct file_system_type *fst,
527527
sb->s_fs_info = kzalloc(sizeof(struct orangefs_sb_info_s), GFP_KERNEL);
528528
if (!ORANGEFS_SB(sb)) {
529529
d = ERR_PTR(-ENOMEM);
530-
goto free_op;
530+
goto free_sb_and_op;
531531
}
532532

533533
ret = orangefs_fill_sb(sb,

0 commit comments

Comments
 (0)