Commit 057d1df6 authored by NeilBrown's avatar NeilBrown Committed by Greg Kroah-Hartman

staging: lustre: honor error code from ll_iget().

Commit 020ecc6f ("staging: lustre: llite: Remove IS_ERR tests")
changed ll_prep_inode to assume any error from ll_iget() meant
-ENOMEM because at that time it only returned NULL for errors.
Commit c3397e7e ("staging: lustre: llite: add error handler in
inode prepare phase") changed ll_iget() to once again return
meaningful codes, but nobody told ll_prep_inode().

So change ll_prep_inode() back to using PTR_ERR(*inode).
Signed-off-by: default avatarNeilBrown <neilb@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2cd466fe
...@@ -2143,7 +2143,7 @@ int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req, ...@@ -2143,7 +2143,7 @@ int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req,
md.posix_acl = NULL; md.posix_acl = NULL;
} }
#endif #endif
rc = -ENOMEM; rc = PTR_ERR(*inode);
CERROR("new_inode -fatal: rc %d\n", rc); CERROR("new_inode -fatal: rc %d\n", rc);
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment