#include <linux/pagemap.h>
#include <linux/user_namespace.h>
#include <linux/utsname.h>
+#include <linux/delay.h>
#ifdef HAVE_UIDGID_HEADER
# include <linux/uidgid.h>
#endif
/* Flush local XATTR locks to get rid of a possible cancel RPC */
if (opcode == MDS_REINT && fid_is_sane(fid) &&
exp->exp_connect_data.ocd_ibits_known & MDS_INODELOCK_XATTR) {
- struct list_head cancels = LIST_HEAD_INIT(cancels);
+ LIST_HEAD(cancels);
int count;
/* Without that packing would fail */
struct ptlrpc_request *req;
struct ptlrpc_bulk_desc *desc;
int i;
- wait_queue_head_t waitq;
int resends = 0;
- struct l_wait_info lwi;
int rc;
ENTRY;
*request = NULL;
- init_waitqueue_head(&waitq);
restart_bulk:
req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_MDS_READPAGE);
exp->exp_obd->obd_name, -EIO);
RETURN(-EIO);
}
- lwi = LWI_TIMEOUT_INTR(cfs_time_seconds(resends), NULL, NULL,
- NULL);
- l_wait_event(waitq, 0, &lwi);
+ ssleep(resends);
goto restart_bulk;
}
*/
unsigned long offset = hash_x_index(*hash, hash64);
struct page *page;
+ unsigned long flags;
int found;
- xa_lock_irq(&mapping->i_pages);
+ xa_lock_irqsave(&mapping->i_pages, flags);
found = radix_tree_gang_lookup(&mapping->page_tree,
(void **)&page, offset, 1);
if (found > 0 && !radix_tree_exceptional_entry(page)) {
struct lu_dirpage *dp;
get_page(page);
- xa_unlock_irq(&mapping->i_pages);
+ xa_unlock_irqrestore(&mapping->i_pages, flags);
/*
* In contrast to find_lock_page() we are sure that directory
* page cannot be truncated (while DLM lock is held) and,
page = ERR_PTR(-EIO);
}
} else {
- xa_unlock_irq(&mapping->i_pages);
+ xa_unlock_irqrestore(&mapping->i_pages, flags);
page = NULL;
}
return page;
static int mdc_ioc_swap_layouts(struct obd_export *exp,
struct md_op_data *op_data)
{
- struct list_head cancels = LIST_HEAD_INIT(cancels);
+ LIST_HEAD(cancels);
struct ptlrpc_request *req;
int rc, count;
struct mdc_swap_layouts *msl, *payload;