public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Neil Brown <neilb@suse.de>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	Adrian Bunk <bunk@kernel.org>,
	ChristophHellwig <hch@infradead.org>
Subject: [NFS] Use a zero sized array for raw field in struct fid
Date: Tue, 08 Apr 2008 14:01:26 +0100	[thread overview]
Message-ID: <1207659686.3635.278.camel@quoit> (raw)
In-Reply-To: <20080408075807.GA8893@infradead.org>

>From b8732f8bea4e8abc331b8fa58a4047c91e2e7d02 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho@redhat.com>
Date: Tue, 8 Apr 2008 13:12:52 +0100
Subject: [PATCH] [NFS] Use a zero sized array for raw field in struct fid

The raw field's size can vary so we use a zero sized array since
gcc will not allow a variable sized array inside a union. This
has been tested with ext3 and gfs2 and relates to the bug
report: http://lkml.org/lkml/2007/10/24/374 and discussion
thread: http://lkml.org/lkml/2008/4/7/65

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Neil Brown <neilb@suse.de>
Cc: J. Bruce Fields <bfields@fieldses.org>
Cc: Adrian Bunk <bunk@kernel.org>

diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
index adcbb05..de8387b 100644
--- a/include/linux/exportfs.h
+++ b/include/linux/exportfs.h
@@ -43,7 +43,7 @@ struct fid {
 			u32 parent_ino;
 			u32 parent_gen;
 		} i32;
-		__u32 raw[6];
+		__u32 raw[0];
 	};
 };
 
-- 
1.5.1.2




  parent reply	other threads:[~2008-04-08 13:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-07  9:47 [NFS] Increase size of struct fid raw buffer Steven Whitehouse
2008-04-07 15:54 ` Linus Torvalds
2008-04-08  7:50   ` Steven Whitehouse
2008-04-08  7:58     ` Christoph Hellwig
2008-04-08  9:57       ` Steven Whitehouse
2008-04-08 13:01       ` Steven Whitehouse [this message]
2008-04-09 16:13         ` [NFS] Use a zero sized array for raw field in struct fid J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1207659686.3635.278.camel@quoit \
    --to=swhiteho@redhat.com \
    --cc=bfields@fieldses.org \
    --cc=bunk@kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox