diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 6e816c9349a..63625ab3f1e 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -3890,7 +3890,7 @@ static int f2fs_write_begin(const struct kiocb *iocb, block_t blkaddr = NULL_ADDR; int err = 0; - if (iocb->ki_flags & IOCB_DONTCACHE) + if (iocb && iocb->ki_flags & IOCB_DONTCACHE) fgp_flags |= FGP_DONTCACHE; trace_f2fs_write_begin(inode, pos, len);