Make the new code conditional on lp_share_modes() just like the code in open_file_sha...