Skip to content

bcachefs: Fix some hard link count issues

Youling Tang linux-bcachefs lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3bcachefs: return -EMLINK instead of -EINVAL when hard link count exceeds limitfs/bcachefs/errcode.h fs/bcachefs/inode.c+2 -10 replies
2/3bcachefs: Fix maximum link count check when creating hard linksfs/bcachefs/bcachefs.h fs/bcachefs/inode.c+2 -10 replies
3/3bcachefs: Move the link counting check to the VFS layerfs/bcachefs/errcode.h fs/bcachefs/fs.c fs/bcachefs/inode.c +2 more+5 -132 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/3] bcachefs: Fix some hard link count issues

From: Youling Tang <[email protected]>

- Improves error reporting by returning the semantically correct -EMLINK error code.
- Fixes the maximum link count validation logic during hard link creation.
- Consolidates link count checks at the VFS layer for better maintainability.

NOTE: Patch3 alone can resolve this series of issues, but patches1-2 are retained to better trace the problem origins.

Youling Tang (3):
bcachefs: return -EMLINK instead of -EINVAL when hard link count
exceeds limit
bcachefs: Fix maximum link count check when creating hard links
bcachefs: Move the link counting check to the VFS layer

 fs/bcachefs/bcachefs.h |  1 +
 fs/bcachefs/fs.c       |  1 +
 fs/bcachefs/inode.c    | 10 ++--------
 fs/bcachefs/inode.h    |  2 +-
 fs/bcachefs/namei.c    |  4 +---
 5 files changed, 6 insertions(+), 12 deletions(-)
Signature · 1 line
2.43.0