Re: [patch 1/9] procfs: Move /proc/pid/fd[info] handling code to fd.[ch]

2012-08-25 Thread Al Viro
On Sat, Aug 25, 2012 at 06:16:05PM +0100, Al Viro wrote: > On Thu, Aug 23, 2012 at 02:43:24PM +0400, Cyrill Gorcunov wrote: > > This patch prepares the ground for further extension of > > /proc/pid/fd[info] handling code by moving fdinfo handling > > code into fs/proc/fd.c. > > > > I think such mo

Re: [patch 1/9] procfs: Move /proc/pid/fd[info] handling code to fd.[ch]

2012-08-25 Thread Al Viro
On Sat, Aug 25, 2012 at 11:43:25PM +0400, Cyrill Gorcunov wrote: > Would the patch below improve the code? Look, I've not dropped > find_inode_number call since it's a bit unclear for me what > would happen if !child case hit > > child = d_lookup(dir, &qname); > if (!child) { >

Re: [patch 1/9] procfs: Move /proc/pid/fd[info] handling code to fd.[ch]

2012-08-25 Thread Cyrill Gorcunov
On Sat, Aug 25, 2012 at 08:12:18PM +0100, Al Viro wrote: > On Sat, Aug 25, 2012 at 10:58:29PM +0400, Cyrill Gorcunov wrote: > > On Sat, Aug 25, 2012 at 06:55:04PM +0100, Al Viro wrote: > > > > Well, this could be simplified indeed, if I understand you correctly > > > > you propose just save f_mode

Re: [patch 1/9] procfs: Move /proc/pid/fd[info] handling code to fd.[ch]

2012-08-25 Thread Al Viro
On Sat, Aug 25, 2012 at 10:58:29PM +0400, Cyrill Gorcunov wrote: > On Sat, Aug 25, 2012 at 06:55:04PM +0100, Al Viro wrote: > > > Well, this could be simplified indeed, if I understand you correctly > > > you propose just save f_mode in flexible array and use it instead > > > of struct file, right?

Re: [patch 1/9] procfs: Move /proc/pid/fd[info] handling code to fd.[ch]

2012-08-25 Thread Cyrill Gorcunov
On Sat, Aug 25, 2012 at 06:55:04PM +0100, Al Viro wrote: > > Well, this could be simplified indeed, if I understand you correctly > > you propose just save f_mode in flexible array and use it instead > > of struct file, right? (which will require to rewrite code a bit) > > Yes. FWIW, proc_fill_ca

Re: [patch 1/9] procfs: Move /proc/pid/fd[info] handling code to fd.[ch]

2012-08-25 Thread Al Viro
On Sat, Aug 25, 2012 at 09:39:58PM +0400, Cyrill Gorcunov wrote: > On Sat, Aug 25, 2012 at 06:16:05PM +0100, Al Viro wrote: > > On Thu, Aug 23, 2012 at 02:43:24PM +0400, Cyrill Gorcunov wrote: > > > This patch prepares the ground for further extension of > > > /proc/pid/fd[info] handling code by mo

Re: [patch 1/9] procfs: Move /proc/pid/fd[info] handling code to fd.[ch]

2012-08-25 Thread Cyrill Gorcunov
On Sat, Aug 25, 2012 at 06:16:05PM +0100, Al Viro wrote: > On Thu, Aug 23, 2012 at 02:43:24PM +0400, Cyrill Gorcunov wrote: > > This patch prepares the ground for further extension of > > /proc/pid/fd[info] handling code by moving fdinfo handling > > code into fs/proc/fd.c. > > > > I think such mo

Re: [patch 1/9] procfs: Move /proc/pid/fd[info] handling code to fd.[ch]

2012-08-25 Thread Al Viro
On Thu, Aug 23, 2012 at 02:43:24PM +0400, Cyrill Gorcunov wrote: > This patch prepares the ground for further extension of > /proc/pid/fd[info] handling code by moving fdinfo handling > code into fs/proc/fd.c. > > I think such move makes both fs/proc/base.c and fs/proc/fd.c > easier to read. BTW,