public inbox for linux-bcachefs@vger.kernel.org
 help / color / mirror / Atom feed
From: Youling Tang <youling.tang@linux.dev>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: linux-bcachefs@vger.kernel.org, linux-kernel@vger.kernel.org,
	youling.tang@linux.dev, Youling Tang <tangyouling@kylinos.cn>
Subject: [PATCH 0/3] bcachefs: Fix some hard link count issues
Date: Fri, 26 Sep 2025 10:21:47 +0800	[thread overview]
Message-ID: <20250926022150.493115-1-youling.tang@linux.dev> (raw)

From: Youling Tang <tangyouling@kylinos.cn>

- 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(-)

-- 
2.43.0


             reply	other threads:[~2025-09-26  2:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-26  2:21 Youling Tang [this message]
2025-09-26  2:21 ` [PATCH 1/3] bcachefs: return -EMLINK instead of -EINVAL when hard link count exceeds limit Youling Tang
2025-09-26  2:21 ` [PATCH 2/3] bcachefs: Fix maximum link count check when creating hard links Youling Tang
2025-09-26  2:21 ` [PATCH 3/3] bcachefs: Move the link counting check to the VFS layer Youling Tang
2025-09-26  3:42   ` Kent Overstreet
2025-09-26  4:22     ` Youling Tang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250926022150.493115-1-youling.tang@linux.dev \
    --to=youling.tang@linux.dev \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-bcachefs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tangyouling@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox