]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: fix error handling in ceph_atomic_open and ceph_lookup
authorJeff Layton <jlayton@kernel.org>
Wed, 2 Jun 2021 16:46:07 +0000 (12:46 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 22 Jun 2021 11:53:28 +0000 (13:53 +0200)
commit9e7c2d2a502c1f958ef98b726f539b87f6fa2c80
treedf30eb87a1fcd07e2ddae903ce7617cee17766d1
parent9849801a91017bd0668c06cc45dc55c1d699b8a5
ceph: fix error handling in ceph_atomic_open and ceph_lookup

Commit 838caa90cc23 broke the error handling in these functions such
that they don't handle non-ENOENT errors from ceph_mdsc_do_request
properly.

Move the checking of -ENOENT out of ceph_handle_snapdir and into the
callers, and if we get a different error, return it immediately.

Fixes: 838caa90cc23 ("ceph: don't use d_add in ceph_handle_snapdir")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/dir.c
fs/ceph/file.c
fs/ceph/super.h