diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-29 17:11:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-29 17:11:08 -0500 |
commit | aa3fc52546b847f590d86a093afd863ff9081628 (patch) | |
tree | 9d8b35a700287ae19fb3baa0e9f2c93462795d11 /fs/btrfs/file.c | |
parent | 555bdaefd52c386e79f98591810ceb8bab780398 (diff) | |
parent | 5a92bc88cef279261d3f138e25850c122df67045 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (24 commits)
Btrfs: don't use migrate page without CONFIG_MIGRATION
Btrfs: deal with DIO bios that span more than one ordered extent
Btrfs: setup blank root and fs_info for mount time
Btrfs: fix fiemap
Btrfs - fix race between btrfs_get_sb() and umount
Btrfs: update inode ctime when using links
Btrfs: make sure new inode size is ok in fallocate
Btrfs: fix typo in fallocate to make it honor actual size
Btrfs: avoid NULL pointer deref in try_release_extent_buffer
Btrfs: make btrfs_add_nondir take parent inode as an argument
Btrfs: hold i_mutex when calling btrfs_log_dentry_safe
Btrfs: use dget_parent where we can UPDATED
Btrfs: fix more ESTALE problems with NFS
Btrfs: handle NFS lookups properly
btrfs: make 1-bit signed fileds unsigned
btrfs: Show device attr correctly for symlinks
btrfs: Set file size correctly in file clone
btrfs: Check if dest_offset is block-size aligned before cloning file
Btrfs: handle the space_cache option properly
btrfs: Fix early enospc because 'unused' calculated with wrong sign.
...
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index e354c33df082..c1faded5fca0 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -1047,8 +1047,14 @@ out: | |||
1047 | 1047 | ||
1048 | if ((file->f_flags & O_DSYNC) || IS_SYNC(inode)) { | 1048 | if ((file->f_flags & O_DSYNC) || IS_SYNC(inode)) { |
1049 | trans = btrfs_start_transaction(root, 0); | 1049 | trans = btrfs_start_transaction(root, 0); |
1050 | if (IS_ERR(trans)) { | ||
1051 | num_written = PTR_ERR(trans); | ||
1052 | goto done; | ||
1053 | } | ||
1054 | mutex_lock(&inode->i_mutex); | ||
1050 | ret = btrfs_log_dentry_safe(trans, root, | 1055 | ret = btrfs_log_dentry_safe(trans, root, |
1051 | file->f_dentry); | 1056 | file->f_dentry); |
1057 | mutex_unlock(&inode->i_mutex); | ||
1052 | if (ret == 0) { | 1058 | if (ret == 0) { |
1053 | ret = btrfs_sync_log(trans, root); | 1059 | ret = btrfs_sync_log(trans, root); |
1054 | if (ret == 0) | 1060 | if (ret == 0) |
@@ -1067,6 +1073,7 @@ out: | |||
1067 | (start_pos + num_written - 1) >> PAGE_CACHE_SHIFT); | 1073 | (start_pos + num_written - 1) >> PAGE_CACHE_SHIFT); |
1068 | } | 1074 | } |
1069 | } | 1075 | } |
1076 | done: | ||
1070 | current->backing_dev_info = NULL; | 1077 | current->backing_dev_info = NULL; |
1071 | return num_written ? num_written : err; | 1078 | return num_written ? num_written : err; |
1072 | } | 1079 | } |