linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Possible coding issue in udf??
@ 2011-05-14  2:57 Alex Davis
  2011-05-15 15:14 ` Andi Kleen
  2011-05-15 17:13 ` Andreas Schwab
  0 siblings, 2 replies; 7+ messages in thread
From: Alex Davis @ 2011-05-14  2:57 UTC (permalink / raw)
  To: linux-kernel, linux-fsdevel

In fs/udf/inode.c, line 1455, linux 2.6.35, there is the following code:

	udfperms = ((inode->i_mode & S_IRWXO)) |
		   ((inode->i_mode & S_IRWXG) << 2) |
		   ((inode->i_mode & S_IRWXU) << 4);

Shouldn't we be shifting by 3 bits? i.e:
	udfperms = ((inode->i_mode & S_IRWXO)) |
		   ((inode->i_mode & S_IRWXG) << 3) |
		   ((inode->i_mode & S_IRWXU) << 6);

The S_I.. constants are all defined in include/linux/stat.h as 3-bit values.

I will send a patch if needed.

I code, therefore I am

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-05-15 18:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-14  2:57 Possible coding issue in udf?? Alex Davis
2011-05-15 15:14 ` Andi Kleen
2011-05-15 16:29   ` Eric Dumazet
2011-05-15 16:32   ` Andreas Dilger
2011-05-15 17:15   ` Andreas Schwab
2011-05-15 17:13 ` Andreas Schwab
2011-05-15 18:04   ` Alex Davis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).