Thread (31 messages) 31 messages, 5 authors, 2021-01-20

Re: [PATCH v17 04/10] fs/ntfs3: Add file operations and implementation

From: Matthew Wilcox <willy@infradead.org>
Date: 2021-01-03 22:06:47
Also in: lkml

On Sun, Jan 03, 2021 at 11:57:32PM +0200, Kari Argillander wrote:
quoted
+		/*
+		 * mirror of len, but signed, because run_packed_size()
+		 * works with signed int only
+		 */
+		len64 = len;
+
+		/* how much bytes is packed len64 */
+		size_size = run_packed_size(&len64);
Does (s64 *)&len work just fine?
No.  run_packed_size() is going to load/store eight bytes to/from that
pointer.  You can't just cast a pointer to a different size and expect
it to work (it might happen to work, particularly on little-endian,
but big-endian is going to get completely the wrong value).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help