All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] CIFS: Set ->should_dirty in cifs_user_readv()
@ 2017-05-05  5:30 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2017-05-05  5:30 UTC (permalink / raw)
  To: Steve French, Pavel Shilovsky
  Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	samba-technical-w/Ol4Ecudpl8XjKLYN78aQ,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA

The current code causes a static checker warning because ITER_IOVEC is
zero so the condition is never true.

Fixes: 6685c5e2d1ac ("CIFS: Add asynchronous read support through kernel AIO")
Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
I'm assuming this is the correct fix from looking at how ITER_IOVEC is
normally used.  Please review.

diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 6ef78ad838e6..71ba8fa63c41 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -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);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] CIFS: Set ->should_dirty in cifs_user_readv()
@ 2017-05-05  5:30 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2017-05-05  5:30 UTC (permalink / raw)
  To: Steve French, Pavel Shilovsky
  Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	samba-technical-w/Ol4Ecudpl8XjKLYN78aQ,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA

The current code causes a static checker warning because ITER_IOVEC is
zero so the condition is never true.

Fixes: 6685c5e2d1ac ("CIFS: Add asynchronous read support through kernel AIO")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
I'm assuming this is the correct fix from looking at how ITER_IOVEC is
normally used.  Please review.

diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 6ef78ad838e6..71ba8fa63c41 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -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);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] CIFS: Set ->should_dirty in cifs_user_readv()
  2017-05-05  5:30 ` Dan Carpenter
@ 2017-06-21 17:00   ` Steve French
  -1 siblings, 0 replies; 4+ messages in thread
From: Steve French @ 2017-06-21 17:00 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Steve French, Pavel Shilovsky, linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	samba-technical, kernel-janitors

merged into cifs-2.6.git for-next

On Fri, May 5, 2017 at 12:30 AM, Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> wrote:
> The current code causes a static checker warning because ITER_IOVEC is
> zero so the condition is never true.
>
> Fixes: 6685c5e2d1ac ("CIFS: Add asynchronous read support through kernel AIO")
> Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
> I'm assuming this is the correct fix from looking at how ITER_IOVEC is
> normally used.  Please review.
>
> diff --git a/fs/cifs/file.c b/fs/cifs/file.c
> index 6ef78ad838e6..71ba8fa63c41 100644
> --- a/fs/cifs/file.c
> +++ b/fs/cifs/file.c
> @@ -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);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] CIFS: Set ->should_dirty in cifs_user_readv()
@ 2017-06-21 17:00   ` Steve French
  0 siblings, 0 replies; 4+ messages in thread
From: Steve French @ 2017-06-21 17:00 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Steve French, Pavel Shilovsky, linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	samba-technical, kernel-janitors

merged into cifs-2.6.git for-next

On Fri, May 5, 2017 at 12:30 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> The current code causes a static checker warning because ITER_IOVEC is
> zero so the condition is never true.
>
> Fixes: 6685c5e2d1ac ("CIFS: Add asynchronous read support through kernel AIO")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> I'm assuming this is the correct fix from looking at how ITER_IOVEC is
> normally used.  Please review.
>
> diff --git a/fs/cifs/file.c b/fs/cifs/file.c
> index 6ef78ad838e6..71ba8fa63c41 100644
> --- a/fs/cifs/file.c
> +++ b/fs/cifs/file.c
> @@ -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);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-21 17:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-05  5:30 [PATCH] CIFS: Set ->should_dirty in cifs_user_readv() Dan Carpenter
2017-05-05  5:30 ` Dan Carpenter
2017-06-21 17:00 ` Steve French
2017-06-21 17:00   ` Steve French

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.