From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] next cycle fun: ->release() API change
Date: Sun, 12 May 2013 22:47:20 +0100 [thread overview]
Message-ID: <20130512214720.GA8202@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20130512000616.GR25399@ZenIV.linux.org.uk>
On Sun, May 12, 2013 at 01:06:16AM +0100, Al Viro wrote:
> media_file_operations
> v4l2_file_operations
> snd_hwdep_ops
> sound_info_entry_ops
> proto_ops
> auth_ops
> BTW, a lot of those guys are returning void, but there are some that return
> int and I think we ought to review those as well. And that's probably
> worth doing *before* we start merging file_operations ->release() change,
> whether it's just int->void variant or anything more ambitious.
Having looked through some of those:
* cftype->release() is non-NULL only in two instances *and* the
only caller of that method is never called for those instances. WTF does
it exist, in the first place? NB: the set of cftype methods is unspeakably
ugly; check it and puke.
* hsi_port->release(): AFAICS, return value is ignored by the sole
caller. No non-trivial instances in the tree (again, AFAICS) - the only one
is "do nothing and return 0".
* loop_func_table->release(): return value is ignored by most of that
callers; the only in-tree instance returns non-zero only if it sees an obvious
result of memory corruption.
* posix_clock_operations->release(): NULL in the only in-tree instance
of struct posix_clock_operations. The only caller is posix_clock_release()
and return value is passed to its caller, which drops it on the floor.
* uio_info->release(): AFAICS, there are only 3 instances in the
tree. All are always returning 0; incidentally, none of them ever looks
at the second argument of that method (it's int (*release)(struct uio_info *,
struct inode *)). The only caller is uio_release(), which passes the
return value to its caller, which drops it on the floor.
prev parent reply other threads:[~2013-05-12 21:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-09 5:03 [RFC] next cycle fun: ->release() API change Al Viro
2013-05-11 17:05 ` Linus Torvalds
2013-05-11 17:22 ` Al Viro
2013-05-11 19:16 ` Linus Torvalds
2013-05-11 21:06 ` Al Viro
2013-05-11 21:12 ` Linus Torvalds
2013-05-12 0:06 ` Al Viro
2013-05-12 21:47 ` 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=20130512214720.GA8202@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.