mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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:
parent
41d10da371
commit
2b47c3611d
6 changed files with 11 additions and 11 deletions
|
|
@ -2586,7 +2586,7 @@ static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldi
|
|||
/* f_version caches the tgid value that the last readdir call couldn't
|
||||
* return. lseek aka telldir automagically resets f_version to 0.
|
||||
*/
|
||||
tid = filp->f_version;
|
||||
tid = (int)filp->f_version;
|
||||
filp->f_version = 0;
|
||||
for (task = first_tid(leader, tid, pos - 2);
|
||||
task;
|
||||
|
|
@ -2595,7 +2595,7 @@ static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldi
|
|||
if (proc_task_fill_cache(filp, dirent, filldir, task, tid) < 0) {
|
||||
/* returning this tgid failed, save it as the first
|
||||
* pid for the next readir call */
|
||||
filp->f_version = tid;
|
||||
filp->f_version = (u64)tid;
|
||||
put_task_struct(task);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue