* [merged] relay-require-non-null-callbacks-in-relay_open.patch removed from -mm tree
@ 2020-12-16 17:10 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2020-12-16 17:10 UTC (permalink / raw)
To: axboe, hch, hch, jani.nikula, kvalo, mm-commits
The patch titled
Subject: relay: require non-NULL callbacks in relay_open()
has been removed from the -mm tree. Its filename was
relay-require-non-null-callbacks-in-relay_open.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Jani Nikula <jani.nikula@intel.com>
Subject: relay: require non-NULL callbacks in relay_open()
There are no clients passing NULL callbacks, which makes sense as it
wouldn't even create a file. Require non-NULL callbacks, and throw away
the handling for NULL callbacks.
Link: https://lkml.kernel.org/r/e40642f3b027d2bb6bc851ddb60e0a61ea51f5f8.1606153547.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Suggested-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/relay.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
--- a/kernel/relay.c~relay-require-non-null-callbacks-in-relay_open
+++ a/kernel/relay.c
@@ -291,13 +291,6 @@ static int remove_buf_file_default_callb
return -EINVAL;
}
-/* relay channel default callbacks */
-static struct rchan_callbacks default_channel_callbacks = {
- .subbuf_start = subbuf_start_default_callback,
- .create_buf_file = create_buf_file_default_callback,
- .remove_buf_file = remove_buf_file_default_callback,
-};
-
/**
* wakeup_readers - wake up readers waiting on a channel
* @work: contains the channel buffer
@@ -472,11 +465,6 @@ static void relay_close_buf(struct rchan
static void setup_callbacks(struct rchan *chan,
struct rchan_callbacks *cb)
{
- if (!cb) {
- chan->cb = &default_channel_callbacks;
- return;
- }
-
if (!cb->subbuf_start)
cb->subbuf_start = subbuf_start_default_callback;
if (!cb->create_buf_file)
@@ -542,6 +530,8 @@ struct rchan *relay_open(const char *bas
return NULL;
if (subbuf_size > UINT_MAX / n_subbufs)
return NULL;
+ if (!cb)
+ return NULL;
chan = kzalloc(sizeof(struct rchan), GFP_KERNEL);
if (!chan)
_
Patches currently in -mm which might be from jani.nikula@intel.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-16 17:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 17:10 [merged] relay-require-non-null-callbacks-in-relay_open.patch removed from -mm tree akpm
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).