Message ID | 20180526182021.GQ30522@ZenIV.linux.org.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sat, May 26, 2018 at 07:20:21PM +0100, Al Viro wrote: > D'oh... Incremental would be > > diff --git a/fs/proc/fd.c b/fs/proc/fd.c > index 694faeacf42f..f5de22a9e9e0 100644 > --- a/fs/proc/fd.c > +++ b/fs/proc/fd.c > @@ -247,15 +247,15 @@ static int proc_readfd_common(struct file *file, struct dir_context *ctx, > for (fd = ctx->pos - 2; > fd < files_fdtable(files)->max_fds; > fd++, ctx->pos++) { > - struct file *file; > + struct file *f; Ugh. -Wshadow doesn't get turned on until W=2 which is really damn noisy. It's going to take a _lot_ of work to move that over into W=1 or even set by default.
diff --git a/fs/proc/fd.c b/fs/proc/fd.c index 694faeacf42f..f5de22a9e9e0 100644 --- a/fs/proc/fd.c +++ b/fs/proc/fd.c @@ -247,15 +247,15 @@ static int proc_readfd_common(struct file *file, struct dir_context *ctx, for (fd = ctx->pos - 2; fd < files_fdtable(files)->max_fds; fd++, ctx->pos++) { - struct file *file; + struct file *f; struct fd_data data; char name[10 + 1]; int len; - file = fcheck_files(files, fd); - if (!file) + f = fcheck_files(files, fd); + if (!f) continue; - data.mode = file->f_mode; + data.mode = f->f_mode; rcu_read_unlock(); data.fd = fd;