There is no need to do a check_pool_perm() on anything that isn't
a regular file, as the MDS is what handles talking to the OSD in
those cases. Just return 0 if it's not a regular file.
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit
59a3006b88f479cb5333e16fe30201ea14ab1717)
if (!cct->_conf->client_check_pool_perm)
return 0;
+ /* Only need to do this for regular files */
+ if (!in->is_file())
+ return 0;
+
int64_t pool_id = in->layout.pool_id;
std::string pool_ns = in->layout.pool_ns;
std::pair<int64_t, std::string> perm_key(pool_id, pool_ns);