diff mbox

[2/9] btrfs: use btrfs_commit_transaction when setting fslabel

Message ID 20130916182017.948593448@suse.com
State New, archived
Headers show

Commit Message

Jeff Mahoney Sept. 16, 2013, 6:19 p.m. UTC
The set_fslabel ioctl uses btrfs_end_transaction, which means it's possible
that the change will be lost if the system crashes. Let's use
btrfs_commit_transaction instead.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
 fs/btrfs/ioctl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/fs/btrfs/ioctl.c	2013-09-16 13:50:56.131324074 -0400
+++ b/fs/btrfs/ioctl.c	2013-09-16 13:56:46.415235886 -0400
@@ -4091,7 +4091,7 @@  static int btrfs_ioctl_set_fslabel(struc
 	}
 
 	strcpy(super_block->label, label);
-	ret = btrfs_end_transaction(trans, root);
+	ret = btrfs_commit_transaction(trans, root);
 
 out_unlock:
 	mutex_unlock(&root->fs_info->volume_mutex);