From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:57682 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032230AbeEZSUX (ORCPT ); Sat, 26 May 2018 14:20:23 -0400 Date: Sat, 26 May 2018 19:20:21 +0100 From: Al Viro To: Alexey Dobriyan Cc: linux-fsdevel@vger.kernel.org Subject: Re: [RFC][PATCHES] reducing d_add() use, part 3 (procfs) Message-ID: <20180526182021.GQ30522@ZenIV.linux.org.uk> References: <20180513212612.GV30522@ZenIV.linux.org.uk> <20180525235326.GJ30522@ZenIV.linux.org.uk> <20180526000302.GK30522@ZenIV.linux.org.uk> <20180526130726.GA12809@avx2> <20180526135640.GA12618@avx2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180526135640.GA12618@avx2> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, May 26, 2018 at 04:56:40PM +0300, Alexey Dobriyan wrote: > On Sat, May 26, 2018 at 04:07:26PM +0300, Alexey Dobriyan wrote: > > On Sat, May 26, 2018 at 01:03:02AM +0100, Al Viro wrote: > > > On Sat, May 26, 2018 at 12:53:26AM +0100, Al Viro wrote: > > > > > ... and a lot more convoluted ones - procfs side. > > > I would really like an ACK/NAK from Alexey on that part... > > > > Is /proc part self contained? This happens with 5 patches against mainline: > > > > Welcome to Debian GNU/Linux 8 (jessie)! > > > > [ 0.764706] systemd[1]: Failed to insert module 'autofs4' > > [ 0.765357] systemd[1]: Failed to insert module 'ipv6' > > [ 0.766047] systemd[1]: Set hostname to . > > [ 0.778266] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read) > > [ 0.785611] random: systemd: uninitialized urandom read (16 bytes read) > > [ 0.790655] ------------[ cut here ]------------ > > Regardless, the broken patch is > "[PATCH 3/5] don't bother with tid_fd_revalidate() in lookups". 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; 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;