struct super_block *sb = inode->i_sb;
struct hfs_find_data fd;
- hfs_dbg("name %s, ino %ld\n",
++ hfs_dbg("name %s, ino %llu\n",
+ name ? name : NULL, inode->i_ino);
+
if (!HFSPLUS_SB(sb)->attr_tree)
return 0;
if (!inode)
goto out;
- hfs_dbg("dir->i_ino %lu, inode->i_ino %lu\n",
++ hfs_dbg("dir->i_ino %llu, inode->i_ino %llu\n",
+ dir->i_ino, inode->i_ino);
+
res = page_symlink(inode, symname, strlen(symname) + 1);
if (res)
goto out_err;
if (!inode)
goto out;
- hfs_dbg("dir->i_ino %lu, inode->i_ino %lu\n",
++ hfs_dbg("dir->i_ino %llu, inode->i_ino %llu\n",
+ dir->i_ino, inode->i_ino);
+
if (S_ISBLK(mode) || S_ISCHR(mode) || S_ISFIFO(mode) || S_ISSOCK(mode))
init_special_inode(inode, mode, rdev);
sizeof(struct hfsplus_cat_file));
}
- pr_err("b-tree write err: %d, ino %lu\n",
+ res = hfs_btree_write(tree);
+ if (res) {
++ pr_err("b-tree write err: %d, ino %llu\n",
+ res, inode->i_ino);
+ goto out;
+ }
+
+ set_bit(HFSPLUS_I_CAT_DIRTY,
+ &HFSPLUS_I(HFSPLUS_CAT_TREE_I(inode->i_sb))->flags);
set_bit(HFSPLUS_I_CAT_DIRTY, &HFSPLUS_I(inode)->flags);
out:
hfs_find_exit(&fd);
}
hfsplus_inode_write_fork(inode, fork);
if (tree) {
+ mutex_lock_nested(&tree->tree_lock,
+ hfsplus_btree_lock_class(tree));
int err = hfs_btree_write(tree);
+ mutex_unlock(&tree->tree_lock);
if (err) {
- pr_err("b-tree write err: %d, ino %lu\n",
+ pr_err("b-tree write err: %d, ino %llu\n",
err, inode->i_ino);
return err;
}