diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-02 19:50:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-02 19:50:39 -0400 |
commit | ce6eba3dba366b607c0a363c7cdbd4ee8fcc6434 (patch) | |
tree | 7e8bb291ce843457c52659dfa4a5d14444c91c35 /fs/nfs/write.c | |
parent | a5532439ebab93e47784effb96aafa7d7ba4b760 (diff) | |
parent | b3fc5c9bb373661224906bf434c09ca0de032e82 (diff) |
Merge branch 'sched-wait-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull wait_var_event updates from Ingo Molnar:
"This introduces the new wait_var_event() API, which is a more flexible
waiting primitive than wait_on_atomic_t().
All wait_on_atomic_t() users are migrated over to the new API and
wait_on_atomic_t() is removed. The migration fixes one bug and should
result in no functional changes for the other usecases"
* 'sched-wait-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/wait: Improve __var_waitqueue() code generation
sched/wait: Remove the wait_on_atomic_t() API
sched/wait, arch/mips: Fix and convert wait_on_atomic_t() usage to the new wait_var_event() API
sched/wait, fs/ocfs2: Convert wait_on_atomic_t() usage to the new wait_var_event() API
sched/wait, fs/nfs: Convert wait_on_atomic_t() usage to the new wait_var_event() API
sched/wait, fs/fscache: Convert wait_on_atomic_t() usage to the new wait_var_event() API
sched/wait, fs/btrfs: Convert wait_on_atomic_t() usage to the new wait_var_event() API
sched/wait, fs/afs: Convert wait_on_atomic_t() usage to the new wait_var_event() API
sched/wait, drivers/media: Convert wait_on_atomic_t() usage to the new wait_var_event() API
sched/wait, drivers/drm: Convert wait_on_atomic_t() usage to the new wait_var_event() API
sched/wait: Introduce wait_var_event()
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r-- | fs/nfs/write.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index e7d8ceae8f26..6579f3b367bd 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -1620,8 +1620,8 @@ static void nfs_writeback_result(struct rpc_task *task, | |||
1620 | 1620 | ||
1621 | static int wait_on_commit(struct nfs_mds_commit_info *cinfo) | 1621 | static int wait_on_commit(struct nfs_mds_commit_info *cinfo) |
1622 | { | 1622 | { |
1623 | return wait_on_atomic_t(&cinfo->rpcs_out, | 1623 | return wait_var_event_killable(&cinfo->rpcs_out, |
1624 | nfs_wait_atomic_killable, TASK_KILLABLE); | 1624 | !atomic_read(&cinfo->rpcs_out)); |
1625 | } | 1625 | } |
1626 | 1626 | ||
1627 | static void nfs_commit_begin(struct nfs_mds_commit_info *cinfo) | 1627 | static void nfs_commit_begin(struct nfs_mds_commit_info *cinfo) |
@@ -1632,7 +1632,7 @@ static void nfs_commit_begin(struct nfs_mds_commit_info *cinfo) | |||
1632 | static void nfs_commit_end(struct nfs_mds_commit_info *cinfo) | 1632 | static void nfs_commit_end(struct nfs_mds_commit_info *cinfo) |
1633 | { | 1633 | { |
1634 | if (atomic_dec_and_test(&cinfo->rpcs_out)) | 1634 | if (atomic_dec_and_test(&cinfo->rpcs_out)) |
1635 | wake_up_atomic_t(&cinfo->rpcs_out); | 1635 | wake_up_var(&cinfo->rpcs_out); |
1636 | } | 1636 | } |
1637 | 1637 | ||
1638 | void nfs_commitdata_release(struct nfs_commit_data *data) | 1638 | void nfs_commitdata_release(struct nfs_commit_data *data) |