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>
This commit is contained in:
parent
428bb68ad9
commit
40e7e2c0e8
|
@ -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",
|
dout("sync_direct_%s on file %p %lld~%u snapc %p seq %lld\n",
|
||||||
(write ? "write" : "read"), file, pos, (unsigned)count,
|
(write ? "write" : "read"), file, pos, (unsigned)count,
|
||||||
snapc, snapc->seq);
|
snapc, snapc ? snapc->seq : 0);
|
||||||
|
|
||||||
ret = filemap_write_and_wait_range(inode->i_mapping,
|
ret = filemap_write_and_wait_range(inode->i_mapping,
|
||||||
pos, pos + count - 1);
|
pos, pos + count - 1);
|
||||||
|
|
Loading…
Reference in New Issue