diff options
author | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-07-31 07:59:42 -0400 |
---|---|---|
committer | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-07-31 08:16:47 -0400 |
commit | e6db06a53b1dcf4e9da4aba143e2eb4d63418abb (patch) | |
tree | 10adcecb71c95ce4393c39fa7911d091bcadfe09 /fs/xfs/xfs_alloc.c | |
parent | ecc2edd56c49fa31a0a9ed15a7bf810ae79d3b85 (diff) | |
parent | c56f5c0342dfee11a1a13d2f5bb7618de5b17590 (diff) |
Merge with upstream to accommodate with thermal changes
This merge is performed to take commit c56f5c0342dfee11a1 ("Thermal: Make
Thermal trip points writeable") out of Linus' tree and then fixup power
supply class. This is needed since thermal stuff added a new argument:
CC drivers/power/power_supply_core.o
drivers/power/power_supply_core.c: In function ‘psy_register_thermal’:
drivers/power/power_supply_core.c:204:6: warning: passing argument 3 of ‘thermal_zone_device_register’ makes integer from pointer without a cast [enabled by default]
include/linux/thermal.h:154:29: note: expected ‘int’ but argument is of type ‘struct power_supply *’
drivers/power/power_supply_core.c:204:6: error: too few arguments to function ‘thermal_zone_device_register’
include/linux/thermal.h:154:29: note: declared here
make[1]: *** [drivers/power/power_supply_core.o] Error 1
make: *** [drivers/power/] Error 2
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Diffstat (limited to 'fs/xfs/xfs_alloc.c')
-rw-r--r-- | fs/xfs/xfs_alloc.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index 229641fb8e67..4f33c32affe3 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c | |||
@@ -1074,12 +1074,13 @@ restart: | |||
1074 | * If we couldn't get anything, give up. | 1074 | * If we couldn't get anything, give up. |
1075 | */ | 1075 | */ |
1076 | if (bno_cur_lt == NULL && bno_cur_gt == NULL) { | 1076 | if (bno_cur_lt == NULL && bno_cur_gt == NULL) { |
1077 | xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); | ||
1078 | |||
1077 | if (!forced++) { | 1079 | if (!forced++) { |
1078 | trace_xfs_alloc_near_busy(args); | 1080 | trace_xfs_alloc_near_busy(args); |
1079 | xfs_log_force(args->mp, XFS_LOG_SYNC); | 1081 | xfs_log_force(args->mp, XFS_LOG_SYNC); |
1080 | goto restart; | 1082 | goto restart; |
1081 | } | 1083 | } |
1082 | |||
1083 | trace_xfs_alloc_size_neither(args); | 1084 | trace_xfs_alloc_size_neither(args); |
1084 | args->agbno = NULLAGBLOCK; | 1085 | args->agbno = NULLAGBLOCK; |
1085 | return 0; | 1086 | return 0; |
@@ -2433,15 +2434,24 @@ xfs_alloc_vextent_worker( | |||
2433 | current_restore_flags_nested(&pflags, PF_FSTRANS); | 2434 | current_restore_flags_nested(&pflags, PF_FSTRANS); |
2434 | } | 2435 | } |
2435 | 2436 | ||
2436 | 2437 | /* | |
2437 | int /* error */ | 2438 | * Data allocation requests often come in with little stack to work on. Push |
2439 | * them off to a worker thread so there is lots of stack to use. Metadata | ||
2440 | * requests, OTOH, are generally from low stack usage paths, so avoid the | ||
2441 | * context switch overhead here. | ||
2442 | */ | ||
2443 | int | ||
2438 | xfs_alloc_vextent( | 2444 | xfs_alloc_vextent( |
2439 | xfs_alloc_arg_t *args) /* allocation argument structure */ | 2445 | struct xfs_alloc_arg *args) |
2440 | { | 2446 | { |
2441 | DECLARE_COMPLETION_ONSTACK(done); | 2447 | DECLARE_COMPLETION_ONSTACK(done); |
2442 | 2448 | ||
2449 | if (!args->userdata) | ||
2450 | return __xfs_alloc_vextent(args); | ||
2451 | |||
2452 | |||
2443 | args->done = &done; | 2453 | args->done = &done; |
2444 | INIT_WORK(&args->work, xfs_alloc_vextent_worker); | 2454 | INIT_WORK_ONSTACK(&args->work, xfs_alloc_vextent_worker); |
2445 | queue_work(xfs_alloc_wq, &args->work); | 2455 | queue_work(xfs_alloc_wq, &args->work); |
2446 | wait_for_completion(&done); | 2456 | wait_for_completion(&done); |
2447 | return args->result; | 2457 | return args->result; |