Whamcloud - gitweb
LU-8697 llite: remove IS_ERR(master_inode) check 51/23151/2
authorJames Simmons <uja.ornl@yahoo.com>
Thu, 13 Oct 2016 22:32:51 +0000 (18:32 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 25 Oct 2016 02:24:35 +0000 (02:24 +0000)
The kernel function ilookup5_nowait never returns
IS_ERR so we can remove the IS_ERR check in the
ll_md_blocking_ast() function.

Change-Id: I5e72a8f70857f178a2377e9db80b2e2139c56ec3
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: http://review.whamcloud.com/23151
Tested-by: Jenkins
Reviewed-by: Frank Zago <fzago@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/namei.c

index 0ad758e..b687d6e 100644 (file)
@@ -331,8 +331,7 @@ int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
                                master_inode = ilookup5_nowait(inode->i_sb,
                                                    hash, ll_test_inode_by_fid,
                                                        (void *)&lli->lli_pfid);
-                               if (master_inode != NULL &&
-                                       !IS_ERR(master_inode)) {
+                               if (master_inode) {
                                        ll_invalidate_negative_children(
                                                                master_inode);
                                        iput(master_inode);