super.c (4c7912e9198b141b6cd85999d28b48cb5a037aa0) super.c (6b5fe46dfa52441f49c7432b1c1b1cb767834708)
1/*
2 * Copyright (C) 2007 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 979 unchanged lines hidden (view full) ---

988 return 0;
989 }
990
991 btrfs_wait_ordered_roots(fs_info, -1);
992
993 trans = btrfs_attach_transaction_barrier(root);
994 if (IS_ERR(trans)) {
995 /* no transaction, don't bother */
1/*
2 * Copyright (C) 2007 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 979 unchanged lines hidden (view full) ---

988 return 0;
989 }
990
991 btrfs_wait_ordered_roots(fs_info, -1);
992
993 trans = btrfs_attach_transaction_barrier(root);
994 if (IS_ERR(trans)) {
995 /* no transaction, don't bother */
996 if (PTR_ERR(trans) == -ENOENT)
997 return 0;
998 return PTR_ERR(trans);
996 if (PTR_ERR(trans) == -ENOENT) {
997 /*
998 * Exit unless we have some pending changes
999 * that need to go through commit
1000 */
1001 if (fs_info->pending_changes == 0)
1002 return 0;
1003 trans = btrfs_start_transaction(root, 0);
1004 } else {
1005 return PTR_ERR(trans);
1006 }
999 }
1000 return btrfs_commit_transaction(trans, root);
1001}
1002
1003static int btrfs_show_options(struct seq_file *seq, struct dentry *dentry)
1004{
1005 struct btrfs_fs_info *info = btrfs_sb(dentry->d_sb);
1006 struct btrfs_root *root = info->tree_root;

--- 1159 unchanged lines hidden ---
1007 }
1008 return btrfs_commit_transaction(trans, root);
1009}
1010
1011static int btrfs_show_options(struct seq_file *seq, struct dentry *dentry)
1012{
1013 struct btrfs_fs_info *info = btrfs_sb(dentry->d_sb);
1014 struct btrfs_root *root = info->tree_root;

--- 1159 unchanged lines hidden ---