Linux-ext4 Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] ext4: lost matching-pair of trace in ext4_truncate
@ 2020-06-29  2:13 zhengliang
  2020-06-29 19:38 ` Andreas Dilger
  0 siblings, 1 reply; 2+ messages in thread
From: zhengliang @ 2020-06-29  2:13 UTC (permalink / raw)
  To: tytso, adilger.kernel; +Cc: linux-ext4

If truncate inline data successfully, it shoule call trace exit.

Signed-off-by: zhengliang <zhengliang6@huawei.com>
---
 fs/ext4/inode.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index e416096fc081..6d24ed658e30 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -4171,8 +4171,10 @@ int ext4_truncate(struct inode *inode)
 		err = ext4_inline_data_truncate(inode, &has_inline);
 		if (err)
 			return err;
-		if (has_inline)
+		if (has_inline) {
+			trace_ext4_truncate_exit(inode);
 			return 0;
+		}
 	}
 
 	/* If we zero-out tail of the page, we have to create jinode for jbd2 */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29  2:13 [PATCH] ext4: lost matching-pair of trace in ext4_truncate zhengliang
2020-06-29 19:38 ` Andreas Dilger

Linux-ext4 Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-ext4/0 linux-ext4/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-ext4 linux-ext4/ https://lore.kernel.org/linux-ext4 \
		linux-ext4@vger.kernel.org
	public-inbox-index linux-ext4

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-ext4


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git