diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/dir.c')
-rw-r--r-- | drivers/staging/lustre/lustre/llite/dir.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 1ac7a702ce26..a18201913273 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -183,7 +183,10 @@ static int ll_dir_filler(void *_hash, struct page *page0) op_data->op_offset = hash; rc = md_readpage(exp, op_data, page_pool, &request); ll_finish_md_op_data(op_data); - if (rc == 0) { + if (rc < 0) { + /* page0 is special, which was added into page cache early */ + delete_from_page_cache(page0); + } else if (rc == 0) { body = req_capsule_server_get(&request->rq_pill, &RMF_MDT_BODY); /* Checked by mdc_readpage() */ LASSERT(body != NULL); @@ -278,7 +281,7 @@ static struct page *ll_dir_page_locate(struct inode *dir, __u64 *hash, spin_lock_irq(&mapping->tree_lock); found = radix_tree_gang_lookup(&mapping->page_tree, (void **)&page, offset, 1); - if (found > 0) { + if (found > 0 && !radix_tree_exceptional_entry(page)) { struct lu_dirpage *dp; page_cache_get(page); @@ -652,8 +655,8 @@ static int ll_send_mgc_param(struct obd_export *mgc, char *string) return rc; } -int ll_dir_setdirstripe(struct inode *dir, struct lmv_user_md *lump, - char *filename) +static int ll_dir_setdirstripe(struct inode *dir, struct lmv_user_md *lump, + char *filename) { struct ptlrpc_request *request = NULL; struct md_op_data *op_data; |