summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2019-04-23 14:18:45 -0400
committerIlya Dryomov <idryomov@gmail.com>2019-05-07 19:22:37 +0200
commit40e7e2c0e86464bca839cdf891bd58a6d41b60b4 (patch)
treebdfc0aa10e5aa4f2dfee09ce0a60b9c500563d0c /fs/ceph
parent428bb68ad99b9f03c35d7b34d60be54faf954181 (diff)
downloadlinux-40e7e2c0e86464bca839cdf891bd58a6d41b60b4.tar.bz2
ceph: fix NULL pointer deref when debugging is enabled
Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 9f53c3d99304..7ae0f49349e3 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -928,7 +928,7 @@ ceph_direct_read_write(struct kiocb *iocb, struct iov_iter *iter,
dout("sync_direct_%s on file %p %lld~%u snapc %p seq %lld\n",
(write ? "write" : "read"), file, pos, (unsigned)count,
- snapc, snapc->seq);
+ snapc, snapc ? snapc->seq : 0);
ret = filemap_write_and_wait_range(inode->i_mapping,
pos, pos + count - 1);