Linux-ext4 Archive on lore.kernel.org
 help / color / Atom feed
From: zhengliang <zhengliang6@huawei.com>
To: <tytso@mit.edu>, <adilger.kernel@dilger.ca>
Cc: <linux-ext4@vger.kernel.org>
Subject: [PATCH] ext4: lost matching-pair of trace in ext4_truncate
Date: Mon, 29 Jun 2020 10:13:41 +0800
Message-ID: <20200629021341.36129-1-zhengliang6@huawei.com> (raw)

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


             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-29  2:13 zhengliang [this message]
2020-06-29 19:38 ` Andreas Dilger

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=20200629021341.36129-1-zhengliang6@huawei.com \
    --to=zhengliang6@huawei.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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

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