]> git.ipfire.org Git - people/ms/linux.git/commit - fs/dax.c
dax: Fix incorrect argument passed to xas_set_err()
authorHao Li <lihao2018.fnst@cn.fujitsu.com>
Wed, 29 Jul 2020 03:44:36 +0000 (11:44 +0800)
committerVishal Verma <vishal.l.verma@intel.com>
Fri, 31 Jul 2020 00:14:33 +0000 (18:14 -0600)
commit49688e654e48ae176b5bfda33d2416b68e607ce8
tree97ee93c13b240fea45696a9683cdb19c310912a8
parentcbeb0310cfda7b6148f417e36b96539101d7f449
dax: Fix incorrect argument passed to xas_set_err()

The argument passed to xas_set_err() to indicate an error should be negative.
Otherwise, xas_error() will return 0, and grab_mapping_entry() will return the
found entry instead of 'SIGBUS' when the entry is not in fact valid.
This would result in problems in subsequent code paths.

Link: https://lore.kernel.org/r/20200729034436.24267-1-lihao2018.fnst@cn.fujitsu.com
Reviewed-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Signed-off-by: Hao Li <lihao2018.fnst@cn.fujitsu.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
fs/dax.c