staging: lustre: osc: fix bug when setting max_pages_per_rpc
authorWu Libin <lwu@ddn.com>
Mon, 3 Oct 2016 02:28:11 +0000 (22:28 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Oct 2016 08:24:29 +0000 (10:24 +0200)
commitdb431dad75198b03ba47769b920843b4557c02cd
tree61e4c33f10fa9fdc4e94790e77cb6369d61229a0
parente33115e3371579ff1b4f8cd8300889d5b3ea8c49
staging: lustre: osc: fix bug when setting max_pages_per_rpc

After setting like "lctl set_param -P osc.*.max_pages_per_rpc", it
is possible that the function osc_obd_max_pages_per_rpc_seq_write
will be called before ocd_brw_size has been set when mount.
ocd_brw_size is meaningless when it is zero. So it should not be
the limit at that time.

Signed-off-by: Wu Libin <lwu@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6421
Reviewed-on: http://review.whamcloud.com/14333
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/osc/lproc_osc.c