Skip to content

Commit 66ba772

Browse files
committed
Merge branch 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs updates from David Sterba: "The changes range through all types: cleanups, core chagnes, sanity checks, fixes, other user visible changes, detailed list below: - deprecated: user transaction ioctl - mount option ssd does not change allocation alignments - degraded read-write mount is allowed if all the raid profile constraints are met, now based on more accurate check - defrag: do not reset compression afterwards; the NOCOMPRESS flag can be now overriden by defrag - prep work for better extent reference tracking (related to the qgroup slowness with balance) - prep work for compression heuristics - memory allocation reductions (may help latencies on a loaded system) - better accounting for io waiting states - error handling improvements (removed BUGs) - added more sanity checks for shared refs - fix readdir vs pagefault deadlock under some circumstances - fix for 'no-hole' mode, certain combination of compressed and inline extents - send: fix emission of invalid clone operations - fixup file mode if setting acls fail - more fixes from fuzzing - oher cleanups" * 'for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (104 commits) btrfs: submit superblock io with REQ_META and REQ_PRIO btrfs: remove unnecessary memory barrier in btrfs_direct_IO btrfs: remove superfluous chunk_tree argument from btrfs_alloc_dev_extent btrfs: Remove chunk_objectid parameter of btrfs_alloc_dev_extent btrfs: pass fs_info to btrfs_del_root instead of tree_root Btrfs: add one more sanity check for shared ref type Btrfs: remove BUG_ON in __add_tree_block Btrfs: remove BUG() in add_data_reference Btrfs: remove BUG() in print_extent_item Btrfs: remove BUG() in btrfs_extent_inline_ref_size Btrfs: convert to use btrfs_get_extent_inline_ref_type Btrfs: add a helper to retrive extent inline ref type btrfs: scrub: simplify scrub worker initialization btrfs: scrub: clean up division in scrub_find_csum btrfs: scrub: clean up division in __scrub_mark_bitmap btrfs: scrub: use bool for flush_all_writes btrfs: preserve i_mode if __btrfs_set_acl() fails btrfs: Remove extraneous chunk_objectid variable btrfs: Remove chunk_objectid argument from btrfs_make_block_group btrfs: Remove extra parentheses from condition in copy_items() ...
2 parents 126e76f + db95c87 commit 66ba772

40 files changed

+1702
-1540
lines changed

fs/btrfs/acl.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,17 @@ static int __btrfs_set_acl(struct btrfs_trans_handle *trans,
114114
int btrfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
115115
{
116116
int ret;
117+
umode_t old_mode = inode->i_mode;
117118

118119
if (type == ACL_TYPE_ACCESS && acl) {
119120
ret = posix_acl_update_mode(inode, &inode->i_mode, &acl);
120121
if (ret)
121122
return ret;
122123
}
123-
return __btrfs_set_acl(NULL, inode, acl, type);
124+
ret = __btrfs_set_acl(NULL, inode, acl, type);
125+
if (ret)
126+
inode->i_mode = old_mode;
127+
return ret;
124128
}
125129

126130
/*

fs/btrfs/async-thread.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,18 @@ void btrfs_##name(struct work_struct *arg) \
7575
}
7676

7777
struct btrfs_fs_info *
78-
btrfs_workqueue_owner(struct __btrfs_workqueue *wq)
78+
btrfs_workqueue_owner(const struct __btrfs_workqueue *wq)
7979
{
8080
return wq->fs_info;
8181
}
8282

8383
struct btrfs_fs_info *
84-
btrfs_work_owner(struct btrfs_work *work)
84+
btrfs_work_owner(const struct btrfs_work *work)
8585
{
8686
return work->wq->fs_info;
8787
}
8888

89-
bool btrfs_workqueue_normal_congested(struct btrfs_workqueue *wq)
89+
bool btrfs_workqueue_normal_congested(const struct btrfs_workqueue *wq)
9090
{
9191
/*
9292
* We could compare wq->normal->pending with num_online_cpus()

fs/btrfs/async-thread.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void btrfs_queue_work(struct btrfs_workqueue *wq,
8282
void btrfs_destroy_workqueue(struct btrfs_workqueue *wq);
8383
void btrfs_workqueue_set_max(struct btrfs_workqueue *wq, int max);
8484
void btrfs_set_work_high_priority(struct btrfs_work *work);
85-
struct btrfs_fs_info *btrfs_work_owner(struct btrfs_work *work);
86-
struct btrfs_fs_info *btrfs_workqueue_owner(struct __btrfs_workqueue *wq);
87-
bool btrfs_workqueue_normal_congested(struct btrfs_workqueue *wq);
85+
struct btrfs_fs_info *btrfs_work_owner(const struct btrfs_work *work);
86+
struct btrfs_fs_info *btrfs_workqueue_owner(const struct __btrfs_workqueue *wq);
87+
bool btrfs_workqueue_normal_congested(const struct btrfs_workqueue *wq);
8888
#endif

0 commit comments

Comments
 (0)