fuse: Use BUG_ON to check pos validity in fuse_aio_write

Change the check that iocb->ki_pos should be equal to pos
to a BUG_ON from a WARN_ON to ensure we actually catch
the bug before it propagates down and causes other errors.

Change-Id: Ie6d537f3182f638a50166b456226e9c10bb1e3d4
Signed-off-by: Nikhilesh Reddy <reddyn@codeaurora.org>
This commit is contained in:
Nikhilesh Reddy 2015-08-21 18:24:51 -07:00 committed by Sahitya Tummala
parent 5671010688
commit 560b41b905
1 changed files with 1 additions and 1 deletions

View File

@ -1249,7 +1249,7 @@ static ssize_t fuse_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
return generic_file_aio_write(iocb, iov, nr_segs, pos);
}
WARN_ON(iocb->ki_pos != pos);
BUG_ON(iocb->ki_pos != pos);
ocount = 0;
err = generic_segment_checks(iov, &nr_segs, &ocount, VERIFY_READ);