From: Al Viro <viro@ZenIV.linux.org.uk>
To: Alexander Holler <holler@ahsoftware.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-usb@vger.kernel.org
Subject: Re: [git pull] gadgetfs fixes
Date: Sun, 15 Mar 2015 09:09:46 +0000 [thread overview]
Message-ID: <20150315090946.GW29656@ZenIV.linux.org.uk> (raw)
In-Reply-To: <550547B9.1040602@ahsoftware.de>
On Sun, Mar 15, 2015 at 09:50:01AM +0100, Alexander Holler wrote:
> Hmm, a year ago or so I've stumbled over the fact that the owner
> might be necessary for correct entries in sysfs (that was mtd). I've
> no idea if that's true here too but it might be worse to mention it.
There are two mechanisms. One keeps the filesystem your file is on pinned
while the file is opened. That works for all filesystems, and it's enough
when the methods of that file are in the module defining that filesystem.
In cases when that is not enough (e.g. character device living on ext3 -
it's nice to have ext3 pinned down, but you want the driver that defined
that device to be pinned as well) you can ask to pin a given module for
as long as the file is opened. That's what file_operations ->owner gives.
Your example (mtd creating a file on sysfs) also needs that - you want
mtd pinned, not just sysfs.
gadgetfs, however, has filesystem defined by the same module. So pinning
filesystem_type down is enough - nothing extra is needed, same as for e.g.
a regular file on ext3.
prev parent reply other threads:[~2015-03-15 9:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 16:42 [git pull] gadgetfs fixes Al Viro
2015-03-15 0:39 ` Alexander Holler
2015-03-15 1:39 ` Al Viro
[not found] ` <20150315013948.GU29656-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2015-03-15 6:35 ` Alexander Holler
2015-03-15 8:17 ` Al Viro
2015-03-15 8:31 ` Alexander Holler
2015-03-16 10:11 ` Alexander Holler
2015-03-15 8:50 ` Alexander Holler
2015-03-15 9:09 ` Al Viro [this message]
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=20150315090946.GW29656@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=holler@ahsoftware.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).