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 <[email protected]>
Cc: Martin Bligh <[email protected]>
Cc: "Randy.Dunlap" <[email protected]>
Cc: Al Viro <[email protected]>
Cc: <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: "J. Bruce Fields" <[email protected]>
Cc: Trond Myklebust <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Mathieu Desnoyers 2007-10-16 23:27:21 -07:00 • committed by Linus Torvalds
commit 2b47c3611d
6 changed files with 11 additions and 11 deletions

View file

@ -210,7 +210,7 @@ revalidate:
* not the directory has been modified
* during the copy operation.
*/
unsigned long version = filp->f_version;
u64 version = filp->f_version;
error = filldir(dirent, de->name,
de->name_len,