aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-05-23 06:21:01 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2016-05-25 12:11:58 -0400
commit2997bfd0492d33d230b1475909a0211157a734bc (patch)
tree0e7ed809bc6feae676421b3e2fa81e3b65a40ffd
parent1b3c6d07e29515064aca8a9f86efaea7da4da027 (diff)
NFS: checking for NULL instead of IS_ERR() in nfs_commit_file()
nfs_create_request() doesn't return NULL, it returns error pointers. Fixes: 67911c8f18b5 ('NFS: Add nfs_commit_file()') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
-rw-r--r--fs/nfs/write.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 4dac51ba1f7e..54a4eb6bc462 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1735,8 +1735,8 @@ int nfs_commit_file(struct file *file, struct nfs_write_verifier *verf)
1735 1735
1736 open = get_nfs_open_context(nfs_file_open_context(file)); 1736 open = get_nfs_open_context(nfs_file_open_context(file));
1737 req = nfs_create_request(open, NULL, NULL, 0, i_size_read(inode)); 1737 req = nfs_create_request(open, NULL, NULL, 0, i_size_read(inode));
1738 if (!req) { 1738 if (IS_ERR(req)) {
1739 ret = -ENOMEM; 1739 ret = PTR_ERR(req);
1740 goto out_put; 1740 goto out_put;
1741 } 1741 }
1742 1742