Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2832e936 authored by Eric Dumazet's avatar Eric Dumazet Committed by Linus Torvalds
Browse files

[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: default avatarEric Dumazet <dada1@cosmosbay.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0730ded5
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -89,7 +89,6 @@ struct file *get_empty_filp(void)
	rwlock_init(&f->f_owner.lock);
	rwlock_init(&f->f_owner.lock);
	/* f->f_version: 0 */
	/* f->f_version: 0 */
	INIT_LIST_HEAD(&f->f_list);
	INIT_LIST_HEAD(&f->f_list);
	f->f_maxcount = INT_MAX;
	return f;
	return f;


over:
over:
+1 −1
Original line number Original line Diff line number Diff line
@@ -188,7 +188,7 @@ int rw_verify_area(int read_write, struct file *file, loff_t *ppos, size_t count
	struct inode *inode;
	struct inode *inode;
	loff_t pos;
	loff_t pos;


	if (unlikely(count > file->f_maxcount))
	if (unlikely(count > INT_MAX))
		goto Einval;
		goto Einval;
	pos = *ppos;
	pos = *ppos;
	if (unlikely((pos < 0) || (loff_t) (pos + count) < 0))
	if (unlikely((pos < 0) || (loff_t) (pos + count) < 0))
+0 −1
Original line number Original line Diff line number Diff line
@@ -594,7 +594,6 @@ struct file {
	unsigned int		f_uid, f_gid;
	unsigned int		f_uid, f_gid;
	struct file_ra_state	f_ra;
	struct file_ra_state	f_ra;


	size_t			f_maxcount;
	unsigned long		f_version;
	unsigned long		f_version;
	void			*f_security;
	void			*f_security;