diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-05 10:36:26 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-05 10:36:26 -0700 |
commit | bf1d6b2c76eda86159519bf5c427b1fa8f51f733 (patch) | |
tree | 030fb04185223a03254aa1092750d9c1b819618c /drivers/staging/lustre/lustre/lov/lov_request.c | |
parent | e63a94f12b5fc67b2b92a89d4058e7a9021e900e (diff) | |
parent | 28eb51f7468a43769bd9dca19a54d97ec7a447ed (diff) |
Merge tag 'staging-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging/IIO driver updates from Greg KH:
"Here is the big staging and IIO driver update for 4.14-rc1.
Lots of staging driver fixes and cleanups, including some reorginizing
of the lustre header files to try to impose some sanity on what is,
and what is not, the uapi for that filesystem.
There are some tty core changes in here as well, as the speakup
drivers need them, and that's ok with me, they are sane and the
speakup code is getting nicer because of it.
There is also the addition of the obiligatory new wifi driver, just
because it has been a release or two since we added our last one...
Other than that, lots and lots of small coding style fixes, as usual.
All of these have been in linux-next for a while with no reported
issues"
* tag 'staging-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (612 commits)
staging:rtl8188eu:core Fix remove unneccessary else block
staging: typec: fusb302: make structure fusb302_psy_desc static
staging: unisys: visorbus: make two functions static
staging: fsl-dpaa2/eth: fix off-by-one FD ctrl bitmaks
staging: r8822be: Simplify deinit_priv()
staging: r8822be: Remove some dead code
staging: vboxvideo: Use CONFIG_DRM_KMS_FB_HELPER to check for fbdefio availability
staging:rtl8188eu Fix comparison to NULL
staging: rts5208: rename mmc_ddr_tunning_rx_cmd to mmc_ddr_tuning_rx_cmd
Staging: Pi433: style fix - tabs and spaces
staging: pi433: fix spelling mistake: "preample" -> "preamble"
staging:rtl8188eu:core Fix Code Indent
staging: typec: fusb302: Export current-limit through a power_supply class dev
staging: typec: fusb302: Add support for USB2 charger detection through extcon
staging: typec: fusb302: Use client->irq as irq if set
staging: typec: fusb302: Get max snk mv/ma/mw from device-properties
staging: typec: fusb302: Set max supply voltage to 5V
staging: typec: tcpm: Add get_current_limit tcpc_dev callback
staging:rtl8188eu Use __func__ instead of function name
staging: lustre: coding style fixes found by checkpatch.pl
...
Diffstat (limited to 'drivers/staging/lustre/lustre/lov/lov_request.c')
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_request.c | 46 |
1 files changed, 9 insertions, 37 deletions
diff --git a/drivers/staging/lustre/lustre/lov/lov_request.c b/drivers/staging/lustre/lustre/lov/lov_request.c index 3a747913fb4f..9d3b3f3e9f10 100644 --- a/drivers/staging/lustre/lustre/lov/lov_request.c +++ b/drivers/staging/lustre/lustre/lov/lov_request.c @@ -32,10 +32,10 @@ #define DEBUG_SUBSYSTEM S_LOV -#include "../../include/linux/libcfs/libcfs.h" +#include <linux/libcfs/libcfs.h> -#include "../include/obd_class.h" -#include "../include/lustre/lustre_idl.h" +#include <obd_class.h> +#include <uapi/linux/lustre/lustre_idl.h> #include "lov_internal.h" static void lov_init_set(struct lov_request_set *set) @@ -43,13 +43,10 @@ static void lov_init_set(struct lov_request_set *set) set->set_count = 0; atomic_set(&set->set_completes, 0); atomic_set(&set->set_success, 0); - atomic_set(&set->set_finish_checked, 0); INIT_LIST_HEAD(&set->set_list); - atomic_set(&set->set_refcount, 1); - init_waitqueue_head(&set->set_waitq); } -void lov_finish_set(struct lov_request_set *set) +static void lov_finish_set(struct lov_request_set *set) { struct list_head *pos, *n; @@ -66,32 +63,12 @@ void lov_finish_set(struct lov_request_set *set) kfree(set); } -static int lov_set_finished(struct lov_request_set *set, int idempotent) -{ - int completes = atomic_read(&set->set_completes); - - CDEBUG(D_INFO, "check set %d/%d\n", completes, set->set_count); - - if (completes == set->set_count) { - if (idempotent) - return 1; - if (atomic_inc_return(&set->set_finish_checked) == 1) - return 1; - } - return 0; -} - static void lov_update_set(struct lov_request_set *set, struct lov_request *req, int rc) { - req->rq_complete = 1; - req->rq_rc = rc; - atomic_inc(&set->set_completes); if (rc == 0) atomic_inc(&set->set_success); - - wake_up(&set->set_waitq); } static void lov_set_add_req(struct lov_request *req, @@ -173,8 +150,8 @@ out: (tot) += (add); \ } while (0) -int lov_fini_statfs(struct obd_device *obd, struct obd_statfs *osfs, - int success) +static int lov_fini_statfs(struct obd_device *obd, struct obd_statfs *osfs, + int success) { if (success) { __u32 expected_stripes = lov_get_stripecnt(&obd->u.lov, @@ -205,7 +182,9 @@ int lov_fini_statfs_set(struct lov_request_set *set) rc = lov_fini_statfs(set->set_obd, set->set_oi->oi_osfs, atomic_read(&set->set_success)); } - lov_put_reqset(set); + + lov_finish_set(set); + return rc; } @@ -307,14 +286,7 @@ static int cb_statfs_update(void *cookie, int rc) out_update: lov_update_statfs(osfs, lov_sfs, success); obd_putref(lovobd); - out: - if (set->set_oi->oi_flags & OBD_STATFS_PTLRPCD && - lov_set_finished(set, 0)) { - lov_statfs_interpret(NULL, set, set->set_count != - atomic_read(&set->set_success)); - } - return 0; } |