diff options
| author | Dave Airlie <airlied@redhat.com> | 2015-01-26 18:48:08 -0500 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2015-01-26 18:48:08 -0500 |
| commit | 22cbbceff65cb03ee37495b52f360809fa439293 (patch) | |
| tree | 59ee71a72328743242a2357b0a0af8697d1640e4 /fs | |
| parent | 104b61590dcd5f71ff518e2b820e1cdf9d0350f2 (diff) | |
| parent | 26bc420b59a38e4e6685a73345a0def461136dce (diff) | |
Merge tag 'v3.19-rc6' into drm-fixes
Linux 3.19-rc6
pull in rc6 as the amdkfd fixes are based on it, and I'd rather
be doing the merges separately
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/btrfs/ctree.h | 1 | ||||
| -rw-r--r-- | fs/btrfs/extent-tree.c | 2 | ||||
| -rw-r--r-- | fs/btrfs/extent_io.c | 2 | ||||
| -rw-r--r-- | fs/btrfs/scrub.c | 2 | ||||
| -rw-r--r-- | fs/btrfs/super.c | 14 | ||||
| -rw-r--r-- | fs/btrfs/transaction.c | 2 | ||||
| -rw-r--r-- | fs/cifs/ioctl.c | 21 |
7 files changed, 22 insertions, 22 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 7e607416755a..0b180708bf79 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
| @@ -1171,6 +1171,7 @@ struct btrfs_space_info { | |||
| 1171 | struct percpu_counter total_bytes_pinned; | 1171 | struct percpu_counter total_bytes_pinned; |
| 1172 | 1172 | ||
| 1173 | struct list_head list; | 1173 | struct list_head list; |
| 1174 | /* Protected by the spinlock 'lock'. */ | ||
| 1174 | struct list_head ro_bgs; | 1175 | struct list_head ro_bgs; |
| 1175 | 1176 | ||
| 1176 | struct rw_semaphore groups_sem; | 1177 | struct rw_semaphore groups_sem; |
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 15116585e714..a684086c3c81 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
| @@ -9422,7 +9422,6 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans, | |||
| 9422 | * are still on the list after taking the semaphore | 9422 | * are still on the list after taking the semaphore |
| 9423 | */ | 9423 | */ |
| 9424 | list_del_init(&block_group->list); | 9424 | list_del_init(&block_group->list); |
| 9425 | list_del_init(&block_group->ro_list); | ||
| 9426 | if (list_empty(&block_group->space_info->block_groups[index])) { | 9425 | if (list_empty(&block_group->space_info->block_groups[index])) { |
| 9427 | kobj = block_group->space_info->block_group_kobjs[index]; | 9426 | kobj = block_group->space_info->block_group_kobjs[index]; |
| 9428 | block_group->space_info->block_group_kobjs[index] = NULL; | 9427 | block_group->space_info->block_group_kobjs[index] = NULL; |
| @@ -9464,6 +9463,7 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans, | |||
| 9464 | btrfs_remove_free_space_cache(block_group); | 9463 | btrfs_remove_free_space_cache(block_group); |
| 9465 | 9464 | ||
| 9466 | spin_lock(&block_group->space_info->lock); | 9465 | spin_lock(&block_group->space_info->lock); |
| 9466 | list_del_init(&block_group->ro_list); | ||
| 9467 | block_group->space_info->total_bytes -= block_group->key.offset; | 9467 | block_group->space_info->total_bytes -= block_group->key.offset; |
| 9468 | block_group->space_info->bytes_readonly -= block_group->key.offset; | 9468 | block_group->space_info->bytes_readonly -= block_group->key.offset; |
| 9469 | block_group->space_info->disk_total -= block_group->key.offset * factor; | 9469 | block_group->space_info->disk_total -= block_group->key.offset * factor; |
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 4ebabd237153..790dbae3343c 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
| @@ -2190,7 +2190,7 @@ void btrfs_free_io_failure_record(struct inode *inode, u64 start, u64 end) | |||
| 2190 | 2190 | ||
| 2191 | next = next_state(state); | 2191 | next = next_state(state); |
| 2192 | 2192 | ||
| 2193 | failrec = (struct io_failure_record *)state->private; | 2193 | failrec = (struct io_failure_record *)(unsigned long)state->private; |
| 2194 | free_extent_state(state); | 2194 | free_extent_state(state); |
| 2195 | kfree(failrec); | 2195 | kfree(failrec); |
| 2196 | 2196 | ||
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 9e1569ffbf6e..2f0fbc374e87 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c | |||
| @@ -3053,7 +3053,7 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx, | |||
| 3053 | 3053 | ||
| 3054 | ppath = btrfs_alloc_path(); | 3054 | ppath = btrfs_alloc_path(); |
| 3055 | if (!ppath) { | 3055 | if (!ppath) { |
| 3056 | btrfs_free_path(ppath); | 3056 | btrfs_free_path(path); |
| 3057 | return -ENOMEM; | 3057 | return -ENOMEM; |
| 3058 | } | 3058 | } |
| 3059 | 3059 | ||
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 60f7cbe815e9..6f49b2872a64 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
| @@ -1000,10 +1000,20 @@ int btrfs_sync_fs(struct super_block *sb, int wait) | |||
| 1000 | */ | 1000 | */ |
| 1001 | if (fs_info->pending_changes == 0) | 1001 | if (fs_info->pending_changes == 0) |
| 1002 | return 0; | 1002 | return 0; |
| 1003 | /* | ||
| 1004 | * A non-blocking test if the fs is frozen. We must not | ||
| 1005 | * start a new transaction here otherwise a deadlock | ||
| 1006 | * happens. The pending operations are delayed to the | ||
| 1007 | * next commit after thawing. | ||
| 1008 | */ | ||
| 1009 | if (__sb_start_write(sb, SB_FREEZE_WRITE, false)) | ||
| 1010 | __sb_end_write(sb, SB_FREEZE_WRITE); | ||
| 1011 | else | ||
| 1012 | return 0; | ||
| 1003 | trans = btrfs_start_transaction(root, 0); | 1013 | trans = btrfs_start_transaction(root, 0); |
| 1004 | } else { | ||
| 1005 | return PTR_ERR(trans); | ||
| 1006 | } | 1014 | } |
| 1015 | if (IS_ERR(trans)) | ||
| 1016 | return PTR_ERR(trans); | ||
| 1007 | } | 1017 | } |
| 1008 | return btrfs_commit_transaction(trans, root); | 1018 | return btrfs_commit_transaction(trans, root); |
| 1009 | } | 1019 | } |
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index a605d4e2f2bc..e88b59d13439 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
| @@ -2118,7 +2118,7 @@ void btrfs_apply_pending_changes(struct btrfs_fs_info *fs_info) | |||
| 2118 | unsigned long prev; | 2118 | unsigned long prev; |
| 2119 | unsigned long bit; | 2119 | unsigned long bit; |
| 2120 | 2120 | ||
| 2121 | prev = cmpxchg(&fs_info->pending_changes, 0, 0); | 2121 | prev = xchg(&fs_info->pending_changes, 0); |
| 2122 | if (!prev) | 2122 | if (!prev) |
| 2123 | return; | 2123 | return; |
| 2124 | 2124 | ||
diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c index 45cb59bcc791..8b7898b7670f 100644 --- a/fs/cifs/ioctl.c +++ b/fs/cifs/ioctl.c | |||
| @@ -86,21 +86,16 @@ static long cifs_ioctl_clone(unsigned int xid, struct file *dst_file, | |||
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | src_inode = file_inode(src_file.file); | 88 | src_inode = file_inode(src_file.file); |
| 89 | rc = -EINVAL; | ||
| 90 | if (S_ISDIR(src_inode->i_mode)) | ||
| 91 | goto out_fput; | ||
| 89 | 92 | ||
| 90 | /* | 93 | /* |
| 91 | * Note: cifs case is easier than btrfs since server responsible for | 94 | * Note: cifs case is easier than btrfs since server responsible for |
| 92 | * checks for proper open modes and file type and if it wants | 95 | * checks for proper open modes and file type and if it wants |
| 93 | * server could even support copy of range where source = target | 96 | * server could even support copy of range where source = target |
| 94 | */ | 97 | */ |
| 95 | 98 | lock_two_nondirectories(target_inode, src_inode); | |
| 96 | /* so we do not deadlock racing two ioctls on same files */ | ||
| 97 | if (target_inode < src_inode) { | ||
| 98 | mutex_lock_nested(&target_inode->i_mutex, I_MUTEX_PARENT); | ||
| 99 | mutex_lock_nested(&src_inode->i_mutex, I_MUTEX_CHILD); | ||
| 100 | } else { | ||
| 101 | mutex_lock_nested(&src_inode->i_mutex, I_MUTEX_PARENT); | ||
| 102 | mutex_lock_nested(&target_inode->i_mutex, I_MUTEX_CHILD); | ||
| 103 | } | ||
| 104 | 99 | ||
| 105 | /* determine range to clone */ | 100 | /* determine range to clone */ |
| 106 | rc = -EINVAL; | 101 | rc = -EINVAL; |
| @@ -124,13 +119,7 @@ static long cifs_ioctl_clone(unsigned int xid, struct file *dst_file, | |||
| 124 | out_unlock: | 119 | out_unlock: |
| 125 | /* although unlocking in the reverse order from locking is not | 120 | /* although unlocking in the reverse order from locking is not |
| 126 | strictly necessary here it is a little cleaner to be consistent */ | 121 | strictly necessary here it is a little cleaner to be consistent */ |
| 127 | if (target_inode < src_inode) { | 122 | unlock_two_nondirectories(src_inode, target_inode); |
| 128 | mutex_unlock(&src_inode->i_mutex); | ||
| 129 | mutex_unlock(&target_inode->i_mutex); | ||
| 130 | } else { | ||
| 131 | mutex_unlock(&target_inode->i_mutex); | ||
| 132 | mutex_unlock(&src_inode->i_mutex); | ||
| 133 | } | ||
| 134 | out_fput: | 123 | out_fput: |
| 135 | fdput(src_file); | 124 | fdput(src_file); |
| 136 | out_drop_write: | 125 | out_drop_write: |
