Thread (1 message) 1 message, 1 author, 2014-11-06

Re: [PATCH v5 7/7] fs: add a flag for per-operation O_DSYNC semantics

From: Jeff Moyer <hidden>
Date: 2014-11-06 23:46:08
Also in: ceph-devel, linux-api, linux-fsdevel, linux-mm, linux-nfs, lkml, ocfs2-devel

Milosz Tanski [off-list ref] writes:
-		if (type == READ && (flags & RWF_NONBLOCK))
-			return -EAGAIN;
+		if (type == READ) {
+			if (flags & RWF_NONBLOCK)
+				return -EAGAIN;
+		} else {
+			if (flags & RWF_DSYNC)
+				return -EINVAL;
+		}
Minor nit, but I'd rather read something that looks like this:

	if (type == READ && (flags & RWF_NONBLOCK))
		return -EAGAIN;
	else if (type == WRITE && (flags & RWF_DSYNC))
		return -EINVAL;

I won't lose sleep over it, though.

Reviewed-by: Jeff Moyer <redacted>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help