]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: fix up error handling with snapdirs
authorJeff Layton <jlayton@kernel.org>
Thu, 25 Feb 2021 20:04:15 +0000 (15:04 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 8 Mar 2021 15:19:36 +0000 (10:19 -0500)
commit7a70a113e3549a0747cc65157ff07218c4d030a6
treea17d57ad4dea11482c47292192fa89c548dcf2fd
parent09800e2eb8c006105161ad2d55a54fe59dba7819
ceph: fix up error handling with snapdirs

There are several warts in the snapdir error handling. The -EOPNOTSUPP
return in __snapfh_to_dentry is currently lost, and the call to
ceph_handle_snapdir is not currently checked at all.

Fix all of this up and eliminate a BUG_ON in ceph_get_snapdir. We can
handle that case with a warning and return an error.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ceph/dir.c
fs/ceph/export.c
fs/ceph/inode.c