From d37b1d9943d5138b9b2630b7b7082629a82a1386 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Sun, 20 Aug 2017 20:22:02 +0200 Subject: ceph: adjust 36 checks for NULL pointers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written ... Thus fix the affected source code places. Signed-off-by: Markus Elfring Reviewed-by: Yan, Zheng Signed-off-by: Ilya Dryomov --- fs/ceph/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/ceph/addr.c') diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 0b073b6a2616..d82036e19083 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -540,7 +540,7 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc) /* verify this is a writeable snap context */ snapc = page_snap_context(page); - if (snapc == NULL) { + if (!snapc) { dout("writepage %p page %p not dirty?\n", inode, page); return 0; } -- cgit v1.2.3