XArray: Change xa_insert to return -EBUSY

Userspace translates EEXIST to "File exists" which isn't a very good
error message for the problem.  "Device or resource busy" is a better
indication of what went wrong.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
This commit is contained in:
Matthew Wilcox
2019-02-06 13:07:11 -05:00
parent 809ab9371c
commit fd9dc93e36
5 changed files with 9 additions and 9 deletions

View File

@@ -189,7 +189,7 @@ retry:
*/
if (!err)
return 0;
else if (err != -EEXIST)
else if (err != -EBUSY)
goto failed_unlock;
err = invalidate_inode_pages2_range(btnc, newkey, newkey);