Skip to content

Commit 2832e93

Browse files
Eric DumazetLinus Torvalds
authored andcommitted
[PATCH] remove file.f_maxcount
struct file cleanup: f_maxcount has an unique value (INT_MAX). Just use the hard-wired value. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 0730ded commit 2832e93

3 files changed

Lines changed: 1 addition & 3 deletions

File tree

‎fs/file_table.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ struct file *get_empty_filp(void)
8989
rwlock_init(&f->f_owner.lock);
9090
/* f->f_version: 0 */
9191
INIT_LIST_HEAD(&f->f_list);
92-
f->f_maxcount = INT_MAX;
9392
return f;
9493

9594
over:

‎fs/read_write.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ int rw_verify_area(int read_write, struct file *file, loff_t *ppos, size_t count
188188
struct inode *inode;
189189
loff_t pos;
190190

191-
if (unlikely(count > file->f_maxcount))
191+
if (unlikely(count > INT_MAX))
192192
goto Einval;
193193
pos = *ppos;
194194
if (unlikely((pos < 0) || (loff_t) (pos + count) < 0))

‎include/linux/fs.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,6 @@ struct file {
594594
unsigned int f_uid, f_gid;
595595
struct file_ra_state f_ra;
596596

597-
size_t f_maxcount;
598597
unsigned long f_version;
599598
void *f_security;
600599

0 commit comments

Comments
 (0)