orangefs: remove paranoia in orangefs_set_inode
authorMartin Brandenburg <martin@omnibond.com>
Wed, 16 Mar 2016 18:35:21 +0000 (14:35 -0400)
committerMike Marshall <hubcap@omnibond.com>
Thu, 17 Mar 2016 18:33:56 +0000 (14:33 -0400)
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/inode.c

index 4a350ec..a456252 100644 (file)
@@ -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;
 }