LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix up ext2_fs.h for userspace after reservations backport
@ 2007-11-26 17:19 Eric Sandeen
  2007-11-27 20:55 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2007-11-26 17:19 UTC (permalink / raw
  To: linux-kernel Mailing List
  Cc: Linus Torvalds, Andrew Morton, mbligh, Valerie Henson

From: Tobias Poschwatta <tp@fonz.de>

In commit a686cd898bd999fd026a51e90fb0a3410d258ddb:

 "Val's cross-port of the ext3 reservations code into ext2."

include/linux/ext2_fs.h got a new function whose return value is only
defined if __KERNEL__ is defined. Putting #ifdef __KERNEL__ around the
function seems to help, patch below.

BR, Tobias

Signed-off-by: Eric Sandeen <sandeen@redhat.com>

---

Index: linux-2.6.24-rc1/include/linux/ext2_fs.h
===================================================================
--- linux-2.6.24-rc1.orig/include/linux/ext2_fs.h
+++ linux-2.6.24-rc1/include/linux/ext2_fs.h
@@ -563,11 +563,13 @@ enum {
 					 ~EXT2_DIR_ROUND)
 #define EXT2_MAX_REC_LEN		((1<<16)-1)
 
+#ifdef __KERNEL__
 static inline ext2_fsblk_t
 ext2_group_first_block_no(struct super_block *sb, unsigned long group_no)
 {
 	return group_no * (ext2_fsblk_t)EXT2_BLOCKS_PER_GROUP(sb) +
 		le32_to_cpu(EXT2_SB(sb)->s_es->s_first_data_block);
 }
+#endif
 
 #endif	/* _LINUX_EXT2_FS_H */


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

* Re: [PATCH] fix up ext2_fs.h for userspace after reservations backport
  2007-11-26 17:19 [PATCH] fix up ext2_fs.h for userspace after reservations backport Eric Sandeen
@ 2007-11-27 20:55 ` Andrew Morton
  2007-11-27 21:05   ` Eric Sandeen
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2007-11-27 20:55 UTC (permalink / raw
  To: Eric Sandeen; +Cc: linux-kernel, torvalds, mbligh, val.henson

On Mon, 26 Nov 2007 11:19:57 -0600
Eric Sandeen <sandeen@redhat.com> wrote:

> From: Tobias Poschwatta <tp@fonz.de>
> 
> In commit a686cd898bd999fd026a51e90fb0a3410d258ddb:
> 
>  "Val's cross-port of the ext3 reservations code into ext2."
> 
> include/linux/ext2_fs.h got a new function whose return value is only
> defined if __KERNEL__ is defined. Putting #ifdef __KERNEL__ around the
> function seems to help, patch below.
> 
> BR, Tobias
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> 
> ---
> 
> Index: linux-2.6.24-rc1/include/linux/ext2_fs.h
> ===================================================================
> --- linux-2.6.24-rc1.orig/include/linux/ext2_fs.h
> +++ linux-2.6.24-rc1/include/linux/ext2_fs.h
> @@ -563,11 +563,13 @@ enum {
>  					 ~EXT2_DIR_ROUND)
>  #define EXT2_MAX_REC_LEN		((1<<16)-1)
>  
> +#ifdef __KERNEL__
>  static inline ext2_fsblk_t
>  ext2_group_first_block_no(struct super_block *sb, unsigned long group_no)
>  {
>  	return group_no * (ext2_fsblk_t)EXT2_BLOCKS_PER_GROUP(sb) +
>  		le32_to_cpu(EXT2_SB(sb)->s_es->s_first_data_block);
>  }
> +#endif
>  
>  #endif	/* _LINUX_EXT2_FS_H */

I did this instead:

From: Tobias Poschwatta <tp@fonz.de>

In commit a686cd898bd999fd026a51e90fb0a3410d258ddb:

 "Val's cross-port of the ext3 reservations code into ext2."

include/linux/ext2_fs.h got a new function whose return value is only
defined if __KERNEL__ is defined. Putting #ifdef __KERNEL__ around the
function seems to help, patch below.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/ext2/ext2.h          |    7 +++++++
 include/linux/ext2_fs.h |    7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff -puN include/linux/ext2_fs.h~fix-up-ext2_fsh-for-userspace-after-reservations-backport include/linux/ext2_fs.h
--- a/include/linux/ext2_fs.h~fix-up-ext2_fsh-for-userspace-after-reservations-backport
+++ a/include/linux/ext2_fs.h
@@ -563,11 +563,4 @@ enum {
 					 ~EXT2_DIR_ROUND)
 #define EXT2_MAX_REC_LEN		((1<<16)-1)
 
-static inline ext2_fsblk_t
-ext2_group_first_block_no(struct super_block *sb, unsigned long group_no)
-{
-	return group_no * (ext2_fsblk_t)EXT2_BLOCKS_PER_GROUP(sb) +
-		le32_to_cpu(EXT2_SB(sb)->s_es->s_first_data_block);
-}
-
 #endif	/* _LINUX_EXT2_FS_H */
diff -puN fs/ext2/ext2.h~fix-up-ext2_fsh-for-userspace-after-reservations-backport fs/ext2/ext2.h
--- a/fs/ext2/ext2.h~fix-up-ext2_fsh-for-userspace-after-reservations-backport
+++ a/fs/ext2/ext2.h
@@ -178,3 +178,10 @@ extern const struct inode_operations ext
 /* symlink.c */
 extern const struct inode_operations ext2_fast_symlink_inode_operations;
 extern const struct inode_operations ext2_symlink_inode_operations;
+
+static inline ext2_fsblk_t
+ext2_group_first_block_no(struct super_block *sb, unsigned long group_no)
+{
+	return group_no * (ext2_fsblk_t)EXT2_BLOCKS_PER_GROUP(sb) +
+		le32_to_cpu(EXT2_SB(sb)->s_es->s_first_data_block);
+}
_


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

* Re: [PATCH] fix up ext2_fs.h for userspace after reservations backport
  2007-11-27 20:55 ` Andrew Morton
@ 2007-11-27 21:05   ` Eric Sandeen
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2007-11-27 21:05 UTC (permalink / raw
  To: Andrew Morton; +Cc: linux-kernel, torvalds, mbligh, val.henson

Andrew Morton wrote:

> I did this instead:

(moved offending function from ext2_fs.h to ext2.h)

Look like a better plan, thanks.

-Eric


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

end of thread, other threads:[~2007-11-27 21:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-26 17:19 [PATCH] fix up ext2_fs.h for userspace after reservations backport Eric Sandeen
2007-11-27 20:55 ` Andrew Morton
2007-11-27 21:05   ` Eric Sandeen

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 read-only IMAP folder(s) and NNTP newsgroup(s).