aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/llite/llite_rmtacl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/llite_rmtacl.c')
-rw-r--r--drivers/staging/lustre/lustre/llite/llite_rmtacl.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/staging/lustre/lustre/llite/llite_rmtacl.c b/drivers/staging/lustre/lustre/llite/llite_rmtacl.c
index b27c3f2fcd02..8509b07cb5c7 100644
--- a/drivers/staging/lustre/lustre/llite/llite_rmtacl.c
+++ b/drivers/staging/lustre/lustre/llite/llite_rmtacl.c
@@ -98,7 +98,7 @@ static void rce_free(struct rmtacl_ctl_entry *rce)
}
static struct rmtacl_ctl_entry *__rct_search(struct rmtacl_ctl_table *rct,
- pid_t key)
+ pid_t key)
{
struct rmtacl_ctl_entry *rce;
struct list_head *head = &rct->rct_entries[rce_hashfunc(key)];
@@ -125,12 +125,12 @@ int rct_add(struct rmtacl_ctl_table *rct, pid_t key, int ops)
struct rmtacl_ctl_entry *rce, *e;
rce = rce_alloc(key, ops);
- if (rce == NULL)
+ if (!rce)
return -ENOMEM;
spin_lock(&rct->rct_lock);
e = __rct_search(rct, key);
- if (unlikely(e != NULL)) {
+ if (unlikely(e)) {
CWARN("Unexpected stale rmtacl_entry found: [key: %d] [ops: %d]\n",
(int)key, ops);
rce_free(e);
@@ -172,7 +172,7 @@ void rct_fini(struct rmtacl_ctl_table *rct)
for (i = 0; i < RCE_HASHES; i++)
while (!list_empty(&rct->rct_entries[i])) {
rce = list_entry(rct->rct_entries[i].next,
- struct rmtacl_ctl_entry, rce_list);
+ struct rmtacl_ctl_entry, rce_list);
rce_free(rce);
}
spin_unlock(&rct->rct_lock);
@@ -208,12 +208,12 @@ void ee_free(struct eacl_entry *ee)
}
static struct eacl_entry *__et_search_del(struct eacl_table *et, pid_t key,
- struct lu_fid *fid, int type)
+ struct lu_fid *fid, int type)
{
struct eacl_entry *ee;
struct list_head *head = &et->et_entries[ee_hashfunc(key)];
- LASSERT(fid != NULL);
+ LASSERT(fid);
list_for_each_entry(ee, head, ee_list)
if (ee->ee_key == key) {
if (lu_fid_eq(&ee->ee_fid, fid) &&
@@ -256,12 +256,12 @@ int ee_add(struct eacl_table *et, pid_t key, struct lu_fid *fid, int type,
struct eacl_entry *ee, *e;
ee = ee_alloc(key, fid, type, header);
- if (ee == NULL)
+ if (!ee)
return -ENOMEM;
spin_lock(&et->et_lock);
e = __et_search_del(et, key, fid, type);
- if (unlikely(e != NULL)) {
+ if (unlikely(e)) {
CWARN("Unexpected stale eacl_entry found: [key: %d] [fid: " DFID "] [type: %d]\n",
(int)key, PFID(fid), type);
ee_free(e);
@@ -290,7 +290,7 @@ void et_fini(struct eacl_table *et)
for (i = 0; i < EE_HASHES; i++)
while (!list_empty(&et->et_entries[i])) {
ee = list_entry(et->et_entries[i].next,
- struct eacl_entry, ee_list);
+ struct eacl_entry, ee_list);
ee_free(ee);
}
spin_unlock(&et->et_lock);