Whamcloud - gitweb
LU-9679 osc: fix to return right weight in osc_lock_weight()
cl_io_init() might return a negative value, it could be indicated
lock should be not eliminated, osc_lock_weight() expect a positive
value, fix to return 1 in this case.
This is not a problem for now, as osc_io_init() only return 0,
To avoid any potential issues in the future, better fix it.
Test-Parameters: trivial
Change-Id: I657e5dcc4bb7691bf3b4ca06df7cb87945008a93
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/37735
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>