summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorZhihao Cheng <chengzhihao1@huawei.com>2022-10-11 05:47:29 +0200
committerRichard Weinberger <richard@nod.at>2023-02-02 21:13:38 +0100
commitc04cc68da856eac2b59e2a421c3f81a2afc560db (patch)
tree32b866035cef8321225f045b53556054eb0f2c12 /fs
parentubifs: Rectify space budget for ubifs_xrename() (diff)
downloadlinux-c04cc68da856eac2b59e2a421c3f81a2afc560db.tar.xz
linux-c04cc68da856eac2b59e2a421c3f81a2afc560db.zip
ubifs: Add comments and debug info for ubifs_xrename()
Just like other operations (eg. ubifs_create, do_rename), add comments and debug information for ubifs_xrename(). Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs')
-rw-r--r--fs/ubifs/dir.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
index 94634b872e38..7a1dcd14e387 100644
--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -1566,6 +1566,15 @@ static int ubifs_xrename(struct inode *old_dir, struct dentry *old_dentry,
ubifs_assert(c, fst_inode && snd_inode);
+ /*
+ * Budget request settings: changing two direntries, changing the two
+ * parent directory inodes.
+ */
+
+ dbg_gen("dent '%pd' ino %lu in dir ino %lu exchange dent '%pd' ino %lu in dir ino %lu",
+ old_dentry, fst_inode->i_ino, old_dir->i_ino,
+ new_dentry, snd_inode->i_ino, new_dir->i_ino);
+
err = fscrypt_setup_filename(old_dir, &old_dentry->d_name, 0, &fst_nm);
if (err)
return err;