diff mbox

[1/2] ext4: Conditionally define compat ioctl numbers

Message ID 1274398223.2257.0.camel@localhost
State Accepted, archived
Headers show

Commit Message

Ben Hutchings May 20, 2010, 11:30 p.m. UTC
It is unnecessary, and in general impossible, to define the compat
ioctl numbers except when building the filesystem with CONFIG_COMPAT
defined.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 fs/ext4/ext4.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Theodore Ts'o May 25, 2010, 3:15 p.m. UTC | #1
On Fri, May 21, 2010 at 12:30:22AM +0100, Ben Hutchings wrote:
> It is unnecessary, and in general impossible, to define the compat
> ioctl numbers except when building the filesystem with CONFIG_COMPAT
> defined.

Umm.... why?  (The impossible part)  I think I'm missing something here.

	      	      	  	  	    - Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Theodore Ts'o May 25, 2010, 3:22 p.m. UTC | #2
On Tue, May 25, 2010 at 11:15:48AM -0400, tytso@MIT.EDU wrote:
> On Fri, May 21, 2010 at 12:30:22AM +0100, Ben Hutchings wrote:
> > It is unnecessary, and in general impossible, to define the compat
> > ioctl numbers except when building the filesystem with CONFIG_COMPAT
> > defined.
> 
> Umm.... why?  (The impossible part)  I think I'm missing something here.
> 

Oh, right.  The type widths might not be guaranteed (or even defined).
Never mind...

    	    	     	    	      	 	    	- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index bf938cf..f5c9941 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -398,6 +398,7 @@  struct ext4_new_group_data {
 #define EXT4_IOC_ALLOC_DA_BLKS		_IO('f', 12)
 #define EXT4_IOC_MOVE_EXT		_IOWR('f', 15, struct move_extent)
 
+#if defined(__KERNEL__) && defined(CONFIG_COMPAT)
 /*
  * ioctl commands in 32 bit emulation
  */
@@ -413,6 +414,7 @@  struct ext4_new_group_data {
 #endif
 #define EXT4_IOC32_GETVERSION_OLD	FS_IOC32_GETVERSION
 #define EXT4_IOC32_SETVERSION_OLD	FS_IOC32_SETVERSION
+#endif
 

 /*