summaryrefslogtreecommitdiff
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-09-06 03:27:00 +0400
committerOlof Johansson <olof@lixom.net>2012-09-06 03:27:00 +0400
commit402efdb48d6a6aef9e91e3112a94b679d787fef7 (patch)
tree69ed39eb1c02fd40e4a2f807f4057e18de6ac13c /fs/btrfs/super.c
parent1875962377574b4edb7b164001e3e341c25290d5 (diff)
parent056876f6c73406c06d530d16d020177f5ec4a0bd (diff)
downloadlinux-402efdb48d6a6aef9e91e3112a94b679d787fef7.tar.xz
Merge branch 'pinmux-dt' of git://gitorious.org/sirfprima2-kernel/sirfprima2-kernel into next/dt
This branch enables device tree bindings for the CSR Prima pin control subsystem. All patches acked by Linus W (pinctrl maintainer). * 'pinmux-dt' of git://gitorious.org/sirfprima2-kernel/sirfprima2-kernel: pinctrl: sirf: add DT-binding pinmux mapping support ARM: PRIMA2: rename prima2-cb.dts to prima2.dtsi as it only has SoC features ARM: PRIMA2: add missing interrupts property for pinctrl node + sync to Linux 3.6-rc4
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index f2eb24c477a3..83d6f9f9c220 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -838,7 +838,6 @@ int btrfs_sync_fs(struct super_block *sb, int wait)
struct btrfs_trans_handle *trans;
struct btrfs_fs_info *fs_info = btrfs_sb(sb);
struct btrfs_root *root = fs_info->tree_root;
- int ret;
trace_btrfs_sync_fs(wait);
@@ -849,11 +848,17 @@ int btrfs_sync_fs(struct super_block *sb, int wait)
btrfs_wait_ordered_extents(root, 0, 0);
- trans = btrfs_start_transaction(root, 0);
+ spin_lock(&fs_info->trans_lock);
+ if (!fs_info->running_transaction) {
+ spin_unlock(&fs_info->trans_lock);
+ return 0;
+ }
+ spin_unlock(&fs_info->trans_lock);
+
+ trans = btrfs_join_transaction(root);
if (IS_ERR(trans))
return PTR_ERR(trans);
- ret = btrfs_commit_transaction(trans, root);
- return ret;
+ return btrfs_commit_transaction(trans, root);
}
static int btrfs_show_options(struct seq_file *seq, struct dentry *dentry)
@@ -1530,6 +1535,8 @@ static int btrfs_show_devname(struct seq_file *m, struct dentry *root)
while (cur_devices) {
head = &cur_devices->devices;
list_for_each_entry(dev, head, dev_list) {
+ if (dev->missing)
+ continue;
if (!first_dev || dev->devid < first_dev->devid)
first_dev = dev;
}