diff options
| -rw-r--r-- | fs/btrfs/inode.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 6866c36c26fb..2551b8018399 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
| @@ -4312,12 +4312,23 @@ void btrfs_dirty_inode(struct inode *inode) | |||
| 4312 | /* whoops, lets try again with the full transaction */ | 4312 | /* whoops, lets try again with the full transaction */ |
| 4313 | btrfs_end_transaction(trans, root); | 4313 | btrfs_end_transaction(trans, root); |
| 4314 | trans = btrfs_start_transaction(root, 1); | 4314 | trans = btrfs_start_transaction(root, 1); |
| 4315 | if (IS_ERR(trans)) { | ||
| 4316 | if (printk_ratelimit()) { | ||
| 4317 | printk(KERN_ERR "btrfs: fail to " | ||
| 4318 | "dirty inode %lu error %ld\n", | ||
| 4319 | inode->i_ino, PTR_ERR(trans)); | ||
| 4320 | } | ||
| 4321 | return; | ||
| 4322 | } | ||
| 4315 | btrfs_set_trans_block_group(trans, inode); | 4323 | btrfs_set_trans_block_group(trans, inode); |
| 4316 | 4324 | ||
| 4317 | ret = btrfs_update_inode(trans, root, inode); | 4325 | ret = btrfs_update_inode(trans, root, inode); |
| 4318 | if (ret) { | 4326 | if (ret) { |
| 4319 | printk(KERN_ERR"btrfs: fail to dirty inode %lu error %d\n", | 4327 | if (printk_ratelimit()) { |
| 4320 | inode->i_ino, ret); | 4328 | printk(KERN_ERR "btrfs: fail to " |
| 4329 | "dirty inode %lu error %d\n", | ||
| 4330 | inode->i_ino, ret); | ||
| 4331 | } | ||
| 4321 | } | 4332 | } |
| 4322 | } | 4333 | } |
| 4323 | btrfs_end_transaction(trans, root); | 4334 | btrfs_end_transaction(trans, root); |
