Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-8130 ldlm: simplify ldlm_ns_hash_defs[]
[fs/lustre-release.git]
/
lustre
/
llite
/
pcc.c
diff --git
a/lustre/llite/pcc.c
b/lustre/llite/pcc.c
index
f5e4cae
..
d824c1b
100644
(file)
--- a/
lustre/llite/pcc.c
+++ b/
lustre/llite/pcc.c
@@
-214,13
+214,13
@@
pcc_fname_list_add(struct cfs_lstr *id, struct list_head *fname_list)
{
struct pcc_match_fname *fname;
- OBD_ALLOC
(fname, sizeof(struct pcc_match_fname)
);
+ OBD_ALLOC
_PTR(fname
);
if (fname == NULL)
return -ENOMEM;
OBD_ALLOC(fname->pmf_name, id->ls_len + 1);
if (fname->pmf_name == NULL) {
- OBD_FREE
(fname, sizeof(struct pcc_match_fname)
);
+ OBD_FREE
_PTR(fname
);
return -ENOMEM;
}
@@
-313,7
+313,7
@@
pcc_expression_parse(struct cfs_lstr *src, struct list_head *cond_list)
struct cfs_lstr field;
int rc = 0;
- OBD_ALLOC
(expr, sizeof(struct pcc_expression)
);
+ OBD_ALLOC
_PTR(expr
);
if (expr == NULL)
return -ENOMEM;
@@
-371,7
+371,7
@@
pcc_conjunction_parse(struct cfs_lstr *src, struct list_head *cond_list)
struct cfs_lstr expr;
int rc = 0;
- OBD_ALLOC
(conjunction, sizeof(struct pcc_conjunction)
);
+ OBD_ALLOC
_PTR(conjunction
);
if (conjunction == NULL)
return -ENOMEM;
@@
-1786,11
+1786,10
@@
int pcc_inode_getattr(struct inode *inode, bool *cached)
GOTO(out, rc);
ll_inode_size_lock(inode);
- if (
inode->i_atime.tv_sec < lli->lli_atime
||
- lli->lli_update_atime) {
+ if (
ll_file_test_and_clear_flag(lli, LLIF_UPDATE_ATIME)
||
+ inode->i_atime.tv_sec < lli->lli_atime)
inode->i_atime.tv_sec = lli->lli_atime;
- lli->lli_update_atime = 0;
- }
+
inode->i_mtime.tv_sec = lli->lli_mtime;
inode->i_ctime.tv_sec = lli->lli_ctime;
@@
-2075,13
+2074,12
@@
int pcc_fault(struct vm_area_struct *vma, struct vm_fault *vmf,
static void pcc_layout_wait(struct pcc_inode *pcci)
{
- struct l_wait_info lwi = { 0 };
while (atomic_read(&pcci->pcci_active_ios) > 0) {
CDEBUG(D_CACHE, "Waiting for IO completion: %d\n",
atomic_read(&pcci->pcci_active_ios));
-
l_wait_event
(pcci->pcci_waitq,
-
atomic_read(&pcci->pcci_active_ios) == 0, &lwi
);
+
wait_event_idle
(pcci->pcci_waitq,
+
atomic_read(&pcci->pcci_active_ios) == 0
);
}
}