Commit a0c7d4a0 authored by Linus Torvalds's avatar Linus Torvalds

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
parents f89ce84b ac2c6375
...@@ -26,8 +26,10 @@ static int orangefs_revalidate_lookup(struct dentry *dentry) ...@@ -26,8 +26,10 @@ static int orangefs_revalidate_lookup(struct dentry *dentry)
gossip_debug(GOSSIP_DCACHE_DEBUG, "%s: attempting lookup.\n", __func__); gossip_debug(GOSSIP_DCACHE_DEBUG, "%s: attempting lookup.\n", __func__);
new_op = op_alloc(ORANGEFS_VFS_OP_LOOKUP); new_op = op_alloc(ORANGEFS_VFS_OP_LOOKUP);
if (!new_op) if (!new_op) {
ret = -ENOMEM;
goto out_put_parent; goto out_put_parent;
}
new_op->upcall.req.lookup.sym_follow = ORANGEFS_LOOKUP_LINK_NO_FOLLOW; new_op->upcall.req.lookup.sym_follow = ORANGEFS_LOOKUP_LINK_NO_FOLLOW;
new_op->upcall.req.lookup.parent_refn = parent->refn; new_op->upcall.req.lookup.parent_refn = parent->refn;
......
...@@ -476,7 +476,7 @@ struct dentry *orangefs_mount(struct file_system_type *fst, ...@@ -476,7 +476,7 @@ struct dentry *orangefs_mount(struct file_system_type *fst,
const char *devname, const char *devname,
void *data) void *data)
{ {
int ret = -EINVAL; int ret;
struct super_block *sb = ERR_PTR(-EINVAL); struct super_block *sb = ERR_PTR(-EINVAL);
struct orangefs_kernel_op_s *new_op; struct orangefs_kernel_op_s *new_op;
struct dentry *d = ERR_PTR(-EINVAL); struct dentry *d = ERR_PTR(-EINVAL);
...@@ -527,7 +527,7 @@ struct dentry *orangefs_mount(struct file_system_type *fst, ...@@ -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); sb->s_fs_info = kzalloc(sizeof(struct orangefs_sb_info_s), GFP_KERNEL);
if (!ORANGEFS_SB(sb)) { if (!ORANGEFS_SB(sb)) {
d = ERR_PTR(-ENOMEM); d = ERR_PTR(-ENOMEM);
goto free_op; goto free_sb_and_op;
} }
ret = orangefs_fill_sb(sb, ret = orangefs_fill_sb(sb,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment