HDFS-5913. Nfs3Utils#getWccAttr() should check attr parameter against null. Contributed by Brandon Li

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1568076 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brandon Li 2014-02-13 22:41:29 +00:00
parent d0a5e43de7
commit 983f11ba2d
2 changed files with 5 additions and 1 deletions

View File

@ -1829,7 +1829,8 @@ public COMMIT3Response commit(XDR xdr, Channel channel, int xid,
} catch (IOException e1) { } catch (IOException e1) {
LOG.info("Can't get postOpAttr for fileId: " + handle.getFileId()); LOG.info("Can't get postOpAttr for fileId: " + handle.getFileId());
} }
WccData fileWcc = new WccData(Nfs3Utils.getWccAttr(preOpAttr), postOpAttr); WccData fileWcc = new WccData(preOpAttr == null ? null
: Nfs3Utils.getWccAttr(preOpAttr), postOpAttr);
return new COMMIT3Response(Nfs3Status.NFS3ERR_IO, fileWcc, return new COMMIT3Response(Nfs3Status.NFS3ERR_IO, fileWcc,
Nfs3Constant.WRITE_COMMIT_VERF); Nfs3Constant.WRITE_COMMIT_VERF);
} }

View File

@ -439,6 +439,9 @@ Release 2.4.0 - UNRELEASED
dfs.namenode.secondary.https-address in hdfs-default.xml. dfs.namenode.secondary.https-address in hdfs-default.xml.
(Haohui Mai via cnauroth) (Haohui Mai via cnauroth)
HDFS-5913. Nfs3Utils#getWccAttr() should check attr parameter against null
(brandonli)
Release 2.3.1 - UNRELEASED Release 2.3.1 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES