From: David Woodhouse <dwmw2@infradead.org>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Jan Kara <jack@suse.cz>, Alexander Viro <viro@zeniv.linux.org.uk>,
David Howells <dhowells@redhat.com>,
Alexander Shishkin <virtuoso@slind.org>,
Artem Bityutskiy <dedekind1@gmail.com>,
linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org,
stable@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] mtd: Do not corrupt backing device of device node inode
Date: Tue, 18 May 2010 12:27:03 +0100 [thread overview]
Message-ID: <1274182023.6930.7023.camel@macbook.infradead.org> (raw)
In-Reply-To: <1274105441.6930.6920.camel@macbook.infradead.org>
On Mon, 2010-05-17 at 15:10 +0100, David Woodhouse wrote:
> Now you're just reimplementing iget().
>
> Can we just use iget_locked() to get the appropriate inode (using the
> mtd device number as the inode number)? Then we don't need to bother
> storing it in mtd->inode at all, and we can iput() the last refcount on
> it when the chardevice is closed -- we don't need it to stick around
> until the MTD device is destroyed.
... and we don't _want_ it to stick around until the MTD device is
destroyed, either. We may actually unload the mtdchar module and its
inodes will be destroyed when we unregister the fs type; we don't want
stale pointers to them hanging around to be reused if/when we reload the
mtdchar module later.
I've committed a version which keeps it entirely within the mtdchar
code: http://git.infradead.org/mtd-2.6.git/commitdiff/cd874237
Thanks.
--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation
next prev parent reply other threads:[~2010-05-18 11:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-17 13:55 [PATCH v5] mtd: Do not corrupt backing device of device node inode Kirill A. Shutemov
2010-05-17 14:10 ` David Woodhouse
2010-05-18 11:27 ` David Woodhouse [this message]
2010-05-18 12:18 ` Kirill A. Shutemov
2010-05-18 12:45 ` David Woodhouse
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=1274182023.6930.7023.camel@macbook.infradead.org \
--to=dwmw2@infradead.org \
--cc=dedekind1@gmail.com \
--cc=dhowells@redhat.com \
--cc=jack@suse.cz \
--cc=kirill@shutemov.name \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=stable@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=virtuoso@slind.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).