Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux...
[firefly-linux-kernel-4.4.55.git] / fs / hfsplus / super.c
index 811a84d2d9643677832219a0b960c6d42109480e..796198d26553c378bee3acf095ce9fe22f6ef51e 100644 (file)
@@ -127,8 +127,14 @@ static int hfsplus_system_write_inode(struct inode *inode)
                hfsplus_mark_mdb_dirty(inode->i_sb);
        }
        hfsplus_inode_write_fork(inode, fork);
-       if (tree)
-               hfs_btree_write(tree);
+       if (tree) {
+               int err = hfs_btree_write(tree);
+               if (err) {
+                       printk(KERN_ERR "hfs: b-tree write err: %d, ino %lu\n",
+                                       err, inode->i_ino);
+                       return err;
+               }
+       }
        return 0;
 }
 
@@ -226,6 +232,7 @@ out:
 
 static void delayed_sync_fs(struct work_struct *work)
 {
+       int err;
        struct hfsplus_sb_info *sbi;
 
        sbi = container_of(work, struct hfsplus_sb_info, sync_work.work);
@@ -234,7 +241,9 @@ static void delayed_sync_fs(struct work_struct *work)
        sbi->work_queued = 0;
        spin_unlock(&sbi->work_lock);
 
-       hfsplus_sync_fs(sbi->alloc_file->i_sb, 1);
+       err = hfsplus_sync_fs(sbi->alloc_file->i_sb, 1);
+       if (err)
+               printk(KERN_ERR "hfs: delayed sync fs err %d\n", err);
 }
 
 void hfsplus_mark_mdb_dirty(struct super_block *sb)