]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
staging: lustre: osc: set lock data for readahead lock
authorJinshan Xiong <jinshan.xiong@intel.com>
Sat, 3 Dec 2016 00:53:27 +0000 (19:53 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Dec 2016 09:56:29 +0000 (10:56 +0100)
commit923dc82c61e8943f361fbbecc0af98ff9b361abf
tree3874afbf1702051252bd067bbda8e920e36c9c78
parent29bdcd6725a88c267167066db33ae663ed568331
staging: lustre: osc: set lock data for readahead lock

If osc_io_readahead() finds a lock that belongs to the previous
instance of osc_object, the lock data pointer will be null. It has
to instantiate with new instance otherwise those pages won't be
destroyed at lock cancel, and then finally hit the assertion in
osc_req_attr_set().

This patch revised dlmlock_at_pgoff() to call osc_match_base() to
find caching locks for readahead. And new osc_object will be set
to the lock if it doesn't have one yet.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8005
Reviewed-on: http://review.whamcloud.com/19453
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.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/osc_io.c
drivers/staging/lustre/lustre/osc/osc_lock.c
drivers/staging/lustre/lustre/osc/osc_request.c