mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhiguo Niu <zhiguo.niu@unisoc.com>
To: <jaegeuk@kernel.org>, <chao@kernel.org>
Cc: <linux-f2fs-devel@lists.sourceforge.net>,
	<linux-kernel@vger.kernel.org>, <niuzhiguo84@gmail.com>,
	<zhiguo.niu@unisoc.com>, <ke.wang@unisoc.com>,
	<Hao_hao.Wang@unisoc.com>
Subject: [PATCH 2/2] f2fs: fix to correct check conditions in f2fs_cross_rename
Date: Wed, 14 May 2025 16:45:49 +0800	[thread overview]
Message-ID: <1747212349-18425-2-git-send-email-zhiguo.niu@unisoc.com> (raw)
In-Reply-To: <1747212349-18425-1-git-send-email-zhiguo.niu@unisoc.com>

Should be "old_dir" here.

Fixes: 5c57132eaf52 ("f2fs: support project quota")
Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
---
 fs/f2fs/namei.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index bb22543..07e333e 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -1117,7 +1117,7 @@ static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry,
 	if ((is_inode_flag_set(new_dir, FI_PROJ_INHERIT) &&
 			!projid_eq(F2FS_I(new_dir)->i_projid,
 			F2FS_I(old_inode)->i_projid)) ||
-	    (is_inode_flag_set(new_dir, FI_PROJ_INHERIT) &&
+	    (is_inode_flag_set(old_dir, FI_PROJ_INHERIT) &&
 			!projid_eq(F2FS_I(old_dir)->i_projid,
 			F2FS_I(new_inode)->i_projid)))
 		return -EXDEV;
-- 
1.9.1


  reply	other threads:[~2025-05-14  8:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-14  8:45 [PATCH 1/2] f2fs: use d_inode(dentry) cleanup dentry->d_inode Zhiguo Niu
2025-05-14  8:45 ` Zhiguo Niu [this message]
2025-05-23  2:11   ` [PATCH 2/2] f2fs: fix to correct check conditions in f2fs_cross_rename Chao Yu
2025-05-23  2:10 ` [PATCH 1/2] f2fs: use d_inode(dentry) cleanup dentry->d_inode Chao Yu
2025-05-28 16:20 ` [f2fs-dev] " patchwork-bot+f2fs

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=1747212349-18425-2-git-send-email-zhiguo.niu@unisoc.com \
    --to=zhiguo.niu@unisoc.com \
    --cc=Hao_hao.Wang@unisoc.com \
    --cc=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=ke.wang@unisoc.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=niuzhiguo84@gmail.com \
    /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

all inboxes | Powered by JetHome®