Skip to content

fs: avoid fdput() after failed fdget()

Shuah Khan linux-fsdevel lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 2 repliesIn review
  2. v22 patches 8 repliesSuperseded
  3. v12 patches 4 repliesSuperseded

Changes in v3 from the cover letter

Patches 1&2 changed to get rid of goto.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2fs: avoid fdput() after failed fdget() in ksys_sync_file_range()fs/sync.c+5 -51 reply
2/2fs: avoid fdput() after failed fdget() in kernel_read_file_from_fd()fs/exec.c+3 -31 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchLuis ChamberlainMimi Zohar
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] fs: avoid fdput() after failed fdget()

While debugging an unrelated problem, I noticed these two cases fdput() is called after failed fdget() while reviewing at all the fdget() and fdput() paths in the kernel.

Changes since v2:
Patches 1&2 changed to get rid of goto.

Changes since v1:
Patch 1:
Changed to address review comments to refine the code for improved readability in addition to the change to avoid fdput() on failed fdget()
Patch 2:
No change to v1. Including it in the series to keep the patches together.

Shuah Khan (2):
fs: avoid fdput() after failed fdget() in ksys_sync_file_range()
fs: avoid fdput() after failed fdget() in kernel_read_file_from_fd()

 fs/exec.c |  6 +++---
 fs/sync.c | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
Signature · 1 line
2.25.1