Skip to content

watch_queue: Clean up some code

Siddh Raman Pant keyrings linux-fsdevel linux-security-module lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 4 repliesIn review
  2. v2 posting 3/32 patches 1 replySuperseded
  3. v2 posting 2/32 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 posting 1/32 patches1 replySuperseded
v12 of 3 patches4 repliesSuperseded

Changes in v3 from the cover letter

- Fixed misplaced/incorrect comment for members watch_list and list_node in struct watch.
- Minor rephrase of comment before NULLing in watch_queue_clear().

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2include/linux/watch_queue: Improve documentationinclude/linux/watch_queue.h+75 -274 replies
2/2kernel/watch_queue: NULL the dangling *pipe, and use it for clear checkinclude/linux/watch_queue.h kernel/watch_queue.c+7 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/2] watch_queue: Clean up some code

There is a dangling reference to pipe in a watch_queue after clearing it. Thus, NULL that pointer while clearing.

This change renders wqueue->defunct superfluous, as the latter is only used to check if watch_queue is cleared. With this change, the pipe is NULLed while clearing, so we can just check if the pipe is NULL.

Extending comment for watch_queue->pipe in the definition of watch_queue made the comment conventionally too long (it was already past 80 chars), so I have changed the struct annotations to be kerneldoc-styled, so that I can extend the comment mentioning that the pipe is NULL when watch_queue is cleared. In the process, I have also hopefully improved documentation by documenting things which weren't documented before.

Changes in v3:
- Fixed misplaced/incorrect comment for members watch_list and list_node in struct watch.
- Minor rephrase of comment before NULLing in watch_queue_clear().

Changes in v2 (6 Aug 2022):
- Merged the NULLing and removing defunct patches.
- Removed READ_ONCE barrier in lock_wqueue().
- Improved and fixed errors in struct docs.
- Better commit messages.

Siddh Raman Pant (2):
include/linux/watch_queue: Improve documentation kernel/watch_queue: NULL the dangling *pipe, and use it for clear
check

 include/linux/watch_queue.h | 100 ++++++++++++++++++++++++++----------
 kernel/watch_queue.c        |  12 ++---
 2 files changed, 79 insertions(+), 33 deletions(-)
Signature · 1 line
2.39.0