Skip to content

Commit

Permalink
orangefs: remove paranoia in orangefs_set_inode
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Brandenburg <[email protected]>
Signed-off-by: Mike Marshall <[email protected]>
  • Loading branch information
Martin Brandenburg authored and hubcapsc committed Mar 17, 2016
1 parent 02a5cc5 commit a4c680a
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions fs/orangefs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,16 +365,8 @@ static inline ino_t orangefs_handle_hash(struct orangefs_object_kref *ref)
static int orangefs_set_inode(struct inode *inode, void *data)
{
struct orangefs_object_kref *ref = (struct orangefs_object_kref *) data;
struct orangefs_inode_s *orangefs_inode = NULL;

/* Make sure that we have sane parameters */
if (!data || !inode)
return 0;
orangefs_inode = ORANGEFS_I(inode);
if (!orangefs_inode)
return 0;
orangefs_inode->refn.fs_id = ref->fs_id;
orangefs_inode->refn.khandle = ref->khandle;
ORANGEFS_I(inode)->refn.fs_id = ref->fs_id;
ORANGEFS_I(inode)->refn.khandle = ref->khandle;
return 0;
}

Expand Down

0 comments on commit a4c680a

Please sign in to comment.