aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/file_table.c1
-rw-r--r--fs/read_write.c2
-rw-r--r--include/linux/fs.h1
3 files changed, 1 insertions, 3 deletions
diff --git a/fs/file_table.c b/fs/file_table.c
index 1d3de78e6bc..43e9e1737de 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -89,7 +89,6 @@ struct file *get_empty_filp(void)
89 rwlock_init(&f->f_owner.lock); 89 rwlock_init(&f->f_owner.lock);
90 /* f->f_version: 0 */ 90 /* f->f_version: 0 */
91 INIT_LIST_HEAD(&f->f_list); 91 INIT_LIST_HEAD(&f->f_list);
92 f->f_maxcount = INT_MAX;
93 return f; 92 return f;
94 93
95over: 94over:
diff --git a/fs/read_write.c b/fs/read_write.c
index 563abd09b5c..b60324aaa2b 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -188,7 +188,7 @@ int rw_verify_area(int read_write, struct file *file, loff_t *ppos, size_t count
188 struct inode *inode; 188 struct inode *inode;
189 loff_t pos; 189 loff_t pos;
190 190
191 if (unlikely(count > file->f_maxcount)) 191 if (unlikely(count > INT_MAX))
192 goto Einval; 192 goto Einval;
193 pos = *ppos; 193 pos = *ppos;
194 if (unlikely((pos < 0) || (loff_t) (pos + count) < 0)) 194 if (unlikely((pos < 0) || (loff_t) (pos + count) < 0))
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 67e6732d4fd..2036747c7d1 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -594,7 +594,6 @@ struct file {
594 unsigned int f_uid, f_gid; 594 unsigned int f_uid, f_gid;
595 struct file_ra_state f_ra; 595 struct file_ra_state f_ra;
596 596
597 size_t f_maxcount;
598 unsigned long f_version; 597 unsigned long f_version;
599 void *f_security; 598 void *f_security;
600 599