staging: lustre: fid: fix up debugfs access to ->lcs_space
lcs_space can change while the lock is not held if an RPC in underway. This can be detected by seq->ls_update being set. In this case, reading or writing the value should return -EBUSY. Also, the D_INFO CDEBUG() which reports the lcs_space being updated never fires, as it tests the wrong value - ldebugfs_fid_write_common() returns 'count' on success. Finally, this return value should be returned from ldebugfs_fid_space_seq_write(), rather than always returning 'count', so that errors can be detected. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
Please register or sign in to comment