Re: [PATCH v5 4/5] fs, xfs: introduce MAP_DIRECT for creating block-map-atomic file ranges

From
Kirill A. Shutemov <hidden>
Date
2017-08-16 11:12:44
Also in
linux-fsdevel, linux-mm, linux-xfs, lkml, nvdimm
Reply to
Dan Williams, 2017-08-16
On Wed, Aug 16, 2017 at 12:44:28AM -0700, Dan Williams wrote:
quoted hunk ↗ jump to hunk
@@ -1411,6 +1422,9 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
 
 			/* fall through */
 		case MAP_PRIVATE:
+			if ((flags & (MAP_PRIVATE|MAP_DIRECT))
+					== (MAP_PRIVATE|MAP_DIRECT))
+				return -EINVAL;
We've already checked for MAP_PRIVATE in this codepath. Simple (flags &
MAP_DIRECT) would be enough.

-- 
 Kirill A. Shutemov
Thread (15 messages) 15 messages, 2 authors, last reply 2017-08-16
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help