[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130512214720.GA8202@ZenIV.linux.org.uk>
Date: Sun, 12 May 2013 22:47:20 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] next cycle fun: ->release() API change
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists