Commit 2997bfd0 authored by Dan Carpenter's avatar Dan Carpenter Committed by Anna Schumaker

NFS: checking for NULL instead of IS_ERR() in nfs_commit_file()

nfs_create_request() doesn't return NULL, it returns error pointers.

Fixes: 67911c8f ('NFS: Add nfs_commit_file()')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 1b3c6d07
...@@ -1735,8 +1735,8 @@ int nfs_commit_file(struct file *file, struct nfs_write_verifier *verf) ...@@ -1735,8 +1735,8 @@ int nfs_commit_file(struct file *file, struct nfs_write_verifier *verf)
open = get_nfs_open_context(nfs_file_open_context(file)); open = get_nfs_open_context(nfs_file_open_context(file));
req = nfs_create_request(open, NULL, NULL, 0, i_size_read(inode)); req = nfs_create_request(open, NULL, NULL, 0, i_size_read(inode));
if (!req) { if (IS_ERR(req)) {
ret = -ENOMEM; ret = PTR_ERR(req);
goto out_put; goto out_put;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment