Skip to contentSkip to conversation

mei: don't update offset in write

char-misc-next Tomas Winkler 1 participant 1 message Jul 9, 2018

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

From: Alexander Usyskin <[email protected]>

MEI enables writes of complete messages only
while read can be performed in parts, hence
write should not update the file offset to
not break interleaving partial reads with writes.

---
 drivers/misc/mei/main.c | 1 -
 1 file changed, 1 deletion(-)
drivers/misc/mei/main.c +0 -1
index f690918f7817..302ba7a63bd2 100644
@@ -312,7 +312,6 @@ static ssize_t mei_write(struct file *file, const char __user *ubuf,
 		}
 	}
 
-	*offset = 0;
 	cb = mei_cl_alloc_cb(cl, length, MEI_FOP_WRITE, file);
 	if (!cb) {
 		rets = -ENOMEM;
Signature · 1 line
2.14.4