diff options
author | Youling Tang <tangyouling@kylinos.cn> | 2025-09-26 10:21:49 +0800 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-09-25 23:42:41 -0400 |
commit | 063f5c5b76bc26207338bc9c11fec2069e84f688 (patch) | |
tree | 135e98f667b49bdce833d3a01e9ccd5775ce9f60 /drivers/net/ethernet/cadence | |
parent | 0f70db4846e889ead01b749ce6a4baeb5f5d1c32 (diff) |
bcachefs: Fix maximum link count check when creating hard linksbcachefs-testing
When I changed the maximum link count U32_MAX to 4 for testing purposes, I
discovered that for regular files, the maximum number of hard links created
could actually reach 5 (`inode->i_nlink`).
This occurs because `bi->bi_nlink` does not represent the actual `inode->i_nlink`
value, but rather equals `inode->i_nlink - nlink_bias(bi->bi_mode)`. Therefore,
the `bi->bi_nlink` check in bch2_inode_nlink_inc() needs to be corrected.
Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'drivers/net/ethernet/cadence')
0 files changed, 0 insertions, 0 deletions