void *llog_proc_cb;
};
+#ifndef __KERNEL__
+
+#define cap_raise(c, flag) do {} while(0)
+
+#define CAP_SYS_RESOURCE 24
+
+#endif /* !__KERNEL__ */
+
static inline void llog_gen_init(struct llog_ctxt *ctxt)
{
struct obd_device *obd = ctxt->loc_exp->exp_obd;
int numcookies, void *buf, int idx)
{
struct llog_operations *lop;
+ __u32 cap;
int rc, buflen;
ENTRY;
buflen = rec->lrh_len;
LASSERT(size_round(buflen) == buflen);
+ cap = current->cap_effective;
+ cap_raise(current->cap_effective, CAP_SYS_RESOURCE);
rc = lop->lop_write_rec(handle, rec, logcookies, numcookies, buf, idx);
+ current->cap_effective = cap;
RETURN(rc);
}
struct llog_logid *logid, char *name)
{
struct llog_operations *lop;
+ __u32 cap;
int rc;
ENTRY;
if (lop->lop_create == NULL)
RETURN(-EOPNOTSUPP);
+ cap = current->cap_effective;
+ cap_raise(current->cap_effective, CAP_SYS_RESOURCE);
rc = lop->lop_create(ctxt, res, logid, name);
+ current->cap_effective = cap;
RETURN(rc);
}