From: Eric Dumazet <dada1@cosmosbay.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Suppress deprecated f_maxcount in 'struct file'
Date: Sat, 20 Aug 2005 00:01:14 +0200 [thread overview]
Message-ID: <430656AA.6030805@cosmosbay.com> (raw)
In-Reply-To: <20050819143344.4a6c49b2.akpm@osdl.org>
[-- Attachment #1: Type: text/plain, Size: 673 bytes --]
Andrew Morton a écrit :
> Eric Dumazet <dada1@cosmosbay.com> wrote:
>
>>Considering :
>>
>>[root@dada1 linux-2.6.13-rc6]# find .|xargs grep f_maxcount
>>./fs/file_table.c: f->f_maxcount = INT_MAX;
>>./fs/read_write.c: if (unlikely(count > file->f_maxcount))
>>./include/linux/fs.h: size_t f_maxcount;
>>
>>
>>I was wondering if f_maxcount has a real use these days...
>
>
> No, I guess we can just stick a hard-wired INT_MAX in there.
>
>
OK here is a patch doing the hard wiring then :)
* 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>
[-- Attachment #2: supress_f_maxcount --]
[-- Type: text/plain, Size: 1227 bytes --]
diff -Nru linux-2.6.13-rc6/fs/file_table.c linux-2.6.13-rc6-ed/fs/file_table.c
--- linux-2.6.13-rc6/fs/file_table.c 2005-08-07 20:18:56.000000000 +0200
+++ linux-2.6.13-rc6-ed/fs/file_table.c 2005-08-19 23:51:20.000000000 +0200
@@ -89,7 +89,6 @@
rwlock_init(&f->f_owner.lock);
/* f->f_version: 0 */
INIT_LIST_HEAD(&f->f_list);
- f->f_maxcount = INT_MAX;
return f;
over:
diff -Nru linux-2.6.13-rc6/fs/read_write.c linux-2.6.13-rc6-ed/fs/read_write.c
--- linux-2.6.13-rc6/fs/read_write.c 2005-08-07 20:18:56.000000000 +0200
+++ linux-2.6.13-rc6-ed/fs/read_write.c 2005-08-19 23:51:20.000000000 +0200
@@ -188,7 +188,7 @@
struct inode *inode;
loff_t pos;
- if (unlikely(count > file->f_maxcount))
+ if (unlikely(count > INT_MAX))
goto Einval;
pos = *ppos;
if (unlikely((pos < 0) || (loff_t) (pos + count) < 0))
diff -Nru linux-2.6.13-rc6/include/linux/fs.h linux-2.6.13-rc6-ed/include/linux/fs.h
--- linux-2.6.13-rc6/include/linux/fs.h 2005-08-07 20:18:56.000000000 +0200
+++ linux-2.6.13-rc6-ed/include/linux/fs.h 2005-08-19 23:51:20.000000000 +0200
@@ -594,7 +594,6 @@
unsigned int f_uid, f_gid;
struct file_ra_state f_ra;
- size_t f_maxcount;
unsigned long f_version;
void *f_security;
next prev parent reply other threads:[~2005-08-19 22:01 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-19 11:33 2.6.13-rc6-mm1 Andrew Morton
2005-08-19 13:12 ` 2.6.13-rc6-mm1 Brice Goglin
2005-08-19 13:18 ` 2.6.13-rc6-mm1 Brice Goglin
2005-08-19 13:22 ` 2.6.13-rc6-mm1 Brice Goglin
2005-08-19 13:21 ` 2.6.13-rc6-mm1 Reuben Farrelly
2005-08-19 17:34 ` 2.6.13-rc6-mm1 Andrew Morton
2005-08-20 1:27 ` 2.6.13-rc6-mm1 Reuben Farrelly
2005-08-20 1:34 ` 2.6.13-rc6-mm1 Andrew Morton
2005-08-20 1:36 ` 2.6.13-rc6-mm1 Andrew Morton
2005-08-20 13:40 ` 2.6.13-rc6-mm1 David Woodhouse
2005-08-21 6:25 ` 2.6.13-rc6-mm1 Reuben Farrelly
2005-08-19 13:25 ` 2.6.13-rc6-mm1 Brice Goglin
2005-08-19 13:27 ` 2.6.13-rc6-mm1 Russell King
2005-08-19 13:41 ` 2.6.13-rc6-mm1 Brice Goglin
2005-08-19 13:45 ` 2.6.13-rc6-mm1 Russell King
2005-08-19 14:05 ` 2.6.13-rc6-mm1 Brice Goglin
2005-08-19 15:02 ` 2.6.13-rc6-mm1: drivers/net/s2io.c: compile error with gcc 4.0 Adrian Bunk
2005-08-19 15:20 ` [PATCH] mips: add pcibios_select_root Yoichi Yuasa
2005-08-19 15:45 ` 2.6.13-rc6-mm1 Ed Tomlinson
2005-08-19 16:04 ` 2.6.13-rc6-mm1 Benoit Boissinot
2005-08-19 21:01 ` 2.6.13-rc6-mm1 Ed Tomlinson
2005-08-19 21:24 ` 2.6.13-rc6-mm1 Benoit Boissinot
2005-08-19 16:11 ` 2.6.13-rc6-mm1 Dave Kleikamp
2005-08-19 19:21 ` 2.6.13-rc6-mm1 Andrew Morton
2005-08-19 21:27 ` [RFC] f_maxcount seems to be deprecated ? Eric Dumazet
2005-08-19 21:33 ` Andrew Morton
2005-08-19 22:01 ` Eric Dumazet [this message]
2005-08-22 13:08 ` [PATCH] Suppress deprecated f_maxcount in 'struct file' Peter Staubach
2005-08-22 21:57 ` Jesper Juhl
2005-08-19 16:40 ` 2.6.13-rc6-mm1: drivers/scsi/aic7xxx/ compile error Adrian Bunk
2005-08-19 16:42 ` Christoph Hellwig
2005-08-19 16:42 ` 2.6.13-rc6-mm1 Avuton Olrich
2005-08-19 21:10 ` 2.6.13-rc6-mm1 Greg KH
2005-08-19 21:21 ` 2.6.13-rc6-mm1 Avuton Olrich
2005-08-19 17:28 ` 2.6.13-rc6-mm1: too many 'ipv4_table' variables Adrian Bunk
2005-08-19 18:03 ` 2.6.13-rc6-mm1 Jesper Juhl
2005-08-20 1:00 ` [PATCH] fix warning of TANBAC_TB0219 in drivers/char/Kconfig Yoichi Yuasa
2005-08-19 19:22 ` 2.6.13-rc6-mm1 hallyn
2005-08-19 19:51 ` 2.6.13-rc6-mm1 - OOPS in drivers/net/phy Marc Ballarin
2005-08-19 20:34 ` 2.6.13-rc6-mm1: remove-asm-hdregh.patch problems Adrian Bunk
2005-08-19 20:37 ` Andrew Morton
2005-08-19 22:49 ` 2.6.13-rc6-mm1 broke parallel port printer Adrian Bunk
2005-08-19 23:36 ` [-mm patch] drivers/cdrom/sbpcd.c: fix the compilation Adrian Bunk
2005-08-19 23:45 ` Nish Aravamudan
2005-08-20 0:20 ` 2.6.13-rc6-mm1: why is PHYLIB a user-visible option? Adrian Bunk
2005-08-20 0:29 ` Jeff Garzik
2005-08-20 14:49 ` 2.6.13-rc6-mm1 Martin J. Bligh
2005-08-20 15:43 ` 2.6.13-rc6-mm1 [i6300escb.c 2 bugs, little cleanup] Jiri Slaby
2005-08-20 17:36 ` 2.6.13-rc6-mm1: git-ocfs2.patch breaks jffs Adrian Bunk
2005-08-20 19:03 ` [-mm patch] net/core/sysctl_net_core.c: fix PROC_FS=n compile Adrian Bunk
2005-08-21 0:14 ` David S. Miller
2005-08-21 15:08 ` 2.6.13-rc6-mm1 Martin J. Bligh
2005-08-21 16:30 ` 2.6.13-rc6-mm1 Benoit Boissinot
2005-08-21 17:40 ` 2.6.13-rc6-mm1 Jon Smirl
2005-08-21 21:44 ` 2.6.13-rc6-mm1 Benoit Boissinot
2005-08-21 22:11 ` 2.6.13-rc6-mm1 Jon Smirl
2005-08-22 1:36 ` 2.6.13-rc6-mm1 Rogério Brito
[not found] ` <20050822011528.GA12602@ime.usp.br>
2005-08-22 3:48 ` 2.6.13-rc6-mm1 Andrew Morton
2005-08-22 13:30 ` 2.6.13-rc6-mm1 Rogério Brito
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=430656AA.6030805@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox