All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 1/4] btrfs: handle transaction commit errors in flush_reservations()
Date: Thu, 22 Feb 2024 13:14:14 +0100	[thread overview]
Message-ID: <6bc5ec4e7b211203ce55ae8050a912cd97927697.1708603965.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1708603965.git.dsterba@suse.com>

Other errors in flush_reservations() are handled and also in the caller.
Ignoring commit might make some sense as it's called right after join so
it's to poke the whole commit machinery to free space.

However for consistency return the error. The caller
btrfs_quota_disable() would try to start the transaction which would
in turn fail too so there's no effective change.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/qgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index 044331228bd0..3846433d83d9 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -1324,7 +1324,7 @@ static int flush_reservations(struct btrfs_fs_info *fs_info)
 	trans = btrfs_join_transaction(fs_info->tree_root);
 	if (IS_ERR(trans))
 		return PTR_ERR(trans);
-	btrfs_commit_transaction(trans);
+	ret = btrfs_commit_transaction(trans);
 
 	return ret;
 }
-- 
2.42.1


  reply	other threads:[~2024-02-22 12:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22 12:14 [PATCH 0/4] Simple cleanups David Sterba
2024-02-22 12:14 ` David Sterba [this message]
2024-02-22 12:14 ` [PATCH 2/4] btrfs: pass btrfs_device to btrfs_scratch_superblocks() David Sterba
2024-02-22 12:14 ` [PATCH 3/4] btrfs: merge btrfs_del_delalloc_inode() helpers David Sterba
2024-02-22 12:14 ` [PATCH 4/4] btrfs: pass a valid extent map cache pointer to __get_extent_map() David Sterba
2024-02-22 15:44 ` [PATCH 0/4] Simple cleanups Josef Bacik
2024-02-22 21:48 ` Qu Wenruo

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=6bc5ec4e7b211203ce55ae8050a912cd97927697.1708603965.git.dsterba@suse.com \
    --to=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.