Whamcloud - gitweb
Branch b_release_1_4_6
authoradilger <adilger>
Wed, 25 Jan 2006 11:59:26 +0000 (11:59 +0000)
committeradilger <adilger>
Wed, 25 Jan 2006 11:59:26 +0000 (11:59 +0000)
Remove bogus check for NULL dchild in mds_open_by_fid().  We will always get
either a valid dentry or ERR_PTR() back from ll_lookup_one_len().  This
extra check provokes a false deref-before-NULL error in Coverity (COV:717,718)
b=10098
r=nikita

lustre/mds/mds_open.c

index d696ac5..652b7eb 100644 (file)
@@ -799,9 +799,8 @@ static int mds_open_by_fid(struct ptlrpc_request *req, struct ll_fid *fid,
         intent_set_disposition(rep, DISP_LOOKUP_POS);
 
  open:
-        rc = mds_finish_open(req, dchild, body, flags, &handle, rec, rep,
-                             NULL);
-        rc = mds_finish_transno(mds, dchild ? dchild->d_inode : NULL, handle,
+        rc = mds_finish_open(req, dchild, body, flags, &handle, rec, rep, NULL);
+        rc = mds_finish_transno(mds, dchild->d_inode, handle,
                                 req, rc, rep ? rep->lock_policy_res1 : 0);
         /* XXX what do we do here if mds_finish_transno itself failed? */