RETURN(0);
}
-int filter_auth_capa(struct obd_export *exp, struct lu_fid *fid, obd_seq seq,
- struct lustre_capa *capa, __u64 opc)
+int filter_auth_capa(struct obd_export *exp,
+ struct lu_fid *fid, obd_seq seq,
+ struct lustre_capa *capa, __u64 opc)
{
struct obd_device *obd = exp->exp_obd;
struct filter_obd *filter = &obd->u.filter;
if (!fid_seq_is_mdt(seq))
RETURN(0);
+ if (capa == BYPASS_CAPA)
+ RETURN(0);
+
/* capability is disabled */
if (!filter->fo_fl_oss_capa)
RETURN(0);
int filter_capa_fixoa(struct obd_export *exp, struct obdo *oa, obd_seq seq,
struct lustre_capa *capa)
{
- int rc = 0;
- ENTRY;
+ struct obd_device *obd = exp->exp_obd;
+ struct filter_obd *filter = &obd->u.filter;
+ int rc = 0;
+ ENTRY;
/* skip capa check for llog and obdecho */
if (!fid_seq_is_mdt(seq))
if (!(exp->exp_connect_flags & OBD_CONNECT_OSS_CAPA))
RETURN(0);
+ /* capability is disabled */
+ if (!filter->fo_fl_oss_capa)
+ RETURN(0);
+
if (unlikely(!capa))
RETURN(-EACCES);
if (capa_flags(capa) == LC_ID_CONVERT) {
- struct obd_device *obd = exp->exp_obd;
- struct filter_obd *filter = &obd->u.filter;
struct filter_capa_key *k;
int found = 0;
oa->o_seq = lock->l_resource->lr_name.name[1];
oa->o_valid = OBD_MD_FLID|OBD_MD_FLGROUP;
oinfo->oi_oa = oa;
+ oinfo->oi_capa = BYPASS_CAPA;
rc = obd_sync(&env, lock->l_export, oinfo,
lock->l_policy_data.l_extent.start,