Commit bd3bf1e8 authored by Miklos Szeredi's avatar Miklos Szeredi

fuse: simplify get_fuse_conn*()

All callers dereference the result, so no point in checking for NULL
pointer dereference here.
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent 514b5e3f
......@@ -818,9 +818,7 @@ static inline struct fuse_mount *get_fuse_mount_super(struct super_block *sb)
static inline struct fuse_conn *get_fuse_conn_super(struct super_block *sb)
{
struct fuse_mount *fm = get_fuse_mount_super(sb);
return fm ? fm->fc : NULL;
return get_fuse_mount_super(sb)->fc;
}
static inline struct fuse_mount *get_fuse_mount(struct inode *inode)
......@@ -830,9 +828,7 @@ static inline struct fuse_mount *get_fuse_mount(struct inode *inode)
static inline struct fuse_conn *get_fuse_conn(struct inode *inode)
{
struct fuse_mount *fm = get_fuse_mount(inode);
return fm ? fm->fc : NULL;
return get_fuse_mount_super(inode->i_sb)->fc;
}
static inline struct fuse_inode *get_fuse_inode(struct inode *inode)
......
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