diff options
| author | Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> | 2007-10-17 02:27:21 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:42:53 -0400 |
| commit | 2b47c3611de05c585e2d81204f6c7e3e255a3461 (patch) | |
| tree | 24a14614fb9bf507b4b6ad3fa6a7cfa5a92318fb /include/linux | |
| parent | 41d10da3717409de33d5441f2f6d8f072ab3fbb6 (diff) | |
Fix f_version type: should be u64 instead of unsigned long
Fix f_version type: should be u64 instead of long
There is a type inconsistency between struct inode i_version and struct file
f_version.
fs.h:
struct inode
u64 i_version;
and
struct file
unsigned long f_version;
Users do:
fs/ext3/dir.c:
if (filp->f_version != inode->i_version) {
So why isn't f_version a u64 ? It becomes a problem if versions gets
higher than 2^32 and we are on an architecture where longs are 32 bits.
This patch changes the f_version type to u64, and updates the users accordingly.
It applies to 2.6.23-rc2-mm2.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Martin Bligh <mbligh@google.com>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: <linux-ext4@vger.kernel.org>
Cc: Mark Fasheh <mark.fasheh@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 2 | ||||
| -rw-r--r-- | include/linux/seq_file.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index bb89a5dfe9..30aca33994 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -792,7 +792,7 @@ struct file { | |||
| 792 | unsigned int f_uid, f_gid; | 792 | unsigned int f_uid, f_gid; |
| 793 | struct file_ra_state f_ra; | 793 | struct file_ra_state f_ra; |
| 794 | 794 | ||
| 795 | unsigned long f_version; | 795 | u64 f_version; |
| 796 | #ifdef CONFIG_SECURITY | 796 | #ifdef CONFIG_SECURITY |
| 797 | void *f_security; | 797 | void *f_security; |
| 798 | #endif | 798 | #endif |
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 8bf1e05115..ebbc02b325 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
| @@ -18,7 +18,7 @@ struct seq_file { | |||
| 18 | size_t from; | 18 | size_t from; |
| 19 | size_t count; | 19 | size_t count; |
| 20 | loff_t index; | 20 | loff_t index; |
| 21 | loff_t version; | 21 | u64 version; |
| 22 | struct mutex lock; | 22 | struct mutex lock; |
| 23 | const struct seq_operations *op; | 23 | const struct seq_operations *op; |
| 24 | void *private; | 24 | void *private; |
