-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
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;