Skip to contentSkip to conversation

CIFS: Set ->should_dirty in cifs_user_readv()

PATCH Applied Dan Carpenter 2 participants 2 messages May 5, 2017 – Jun 21, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 CIFS: Set ->should_dirty in cifs_user_readv()

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")

---
I'm assuming this is the correct fix from looking at how ITER_IOVEC is normally used. Please review.

fs/cifs/file.c +1 -1
index 6ef78ad838e6..71ba8fa63c41 100644
@@ -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);
Applied
#1 lore raw

merged into cifs-2.6.git for-next

Quoted 26 lines · Dan Carpenter

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")

---
I'm assuming this is the correct fix from looking at how ITER_IOVEC is normally used. Please review.

fs/cifs/file.c +1 -2
index 6ef78ad838e6..71ba8fa63c41 100644
@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 3 lines
Thanks,

Steve