Re: [PATCH 04/12] seq_file: Make seq_file able to access the file's opener cred

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 25, 2013 at 1:14 PM, Djalal Harouni <tixxdz@xxxxxxxxxx> wrote:
>
> Therefor add the f_cred field to the seq_file struct and a helper
> seq_f_cred() to return it.

I hate how you've split up this patch from the next one that actually
_initializes_ the new field.

The two patches should have been one.

I think the patch should also remove the 'user_ns' member, since it's
now available as f_cred->user_ns.

I also suspect that it would be better to just make the the new
seq_file member point to the 'struct file' instead. Sure, it's an
extra level of indirection, but the lifetime of f_cred is not as clear
otherwise. You don't increment the reference count, which is correct
*only* because 'seq_file' has the same lifetime as 'struct file', and
thus the reference count from struct file for the f_cred is
sufficient.

[ Time passes, I look over the other patches ]

Oh, and I note that you remove user_ns in patch 12. Again, I think
that's just splitting things up too much. It actually gets harder to
see what happens when you do this.

               Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux