Skip to content

Commit

Permalink
CIFS: Set ->should_dirty in cifs_user_readv()
Browse files Browse the repository at this point in the history
The current code causes a static checker warning because ITER_IOVEC is
zero so the condition is never true.

Fixes: 6685c5e ("CIFS: Add asynchronous read support through kernel AIO")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Steve French <[email protected]>
  • Loading branch information
Dan Carpenter authored and smfrench committed Jun 20, 2017
1 parent 9705596 commit 8a7b0d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -3271,7 +3271,7 @@ ssize_t cifs_user_readv(struct kiocb *iocb, struct iov_iter *to)
if (!is_sync_kiocb(iocb))
ctx->iocb = iocb;

if (to->type & ITER_IOVEC)
if (to->type == ITER_IOVEC)
ctx->should_dirty = true;

rc = setup_aio_ctx_iter(ctx, to, READ);
Expand Down

0 comments on commit 8a7b0d8

Please sign in to comment.