-
由 Dan Williams 提交于
Gerd reports that ->i_mode may contain other bits besides S_IFCHR. Use S_ISCHR() instead. Otherwise, get_user_pages_longterm() may fail on device-dax instances when those are meant to be explicitly allowed. Fixes: 2bb6d283 ("mm: introduce get_user_pages_longterm") Cc: <stable@vger.kernel.org> Reported-by: NGerd Rausch <gerd.rausch@oracle.com> Acked-by: NJane Chu <jane.chu@oracle.com> Reported-by: NHaozhong Zhang <haozhong.zhang@intel.com> Reviewed-by: NJan Kara <jack@suse.cz> Signed-off-by: NDan Williams <dan.j.williams@intel.com>
230f5a89