Commit 616387e8 authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman
Browse files

staging/lustre: Get rid of CFS_PAGE_MASK



CFS_PAGE_MASK is the same as PAGE_MASK, so get rid of it.

We are replacing it with PAGE_MASK instead of PAGE_CACHE_MASK
because PAGE_CACHE_* stuff is apparently going away.

Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 81108182
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -57,7 +57,6 @@
#include "../libcfs_cpu.h"
#endif

#define CFS_PAGE_MASK		   (~((__u64)PAGE_CACHE_SIZE-1))
#define page_index(p)       ((p)->index)

#define memory_pressure_get() (current->flags & PF_MEMALLOC)
+1 −1
Original line number Diff line number Diff line
@@ -227,7 +227,7 @@ int cfs_crypto_hash_update_page(struct cfs_crypto_hash_desc *hdesc,
	struct scatterlist sl;

	sg_init_table(&sl, 1);
	sg_set_page(&sl, page, len, offset & ~CFS_PAGE_MASK);
	sg_set_page(&sl, page, len, offset & ~PAGE_MASK);

	ahash_request_set_crypt(req, &sl, NULL, sl.length);
	return crypto_ahash_update(req);
+1 −1
Original line number Diff line number Diff line
@@ -457,7 +457,7 @@ brw_server_handle(struct srpc_server_rpc *rpc)

	if (!(reqstmsg->msg_ses_feats & LST_FEAT_BULK_LEN)) {
		/* compat with old version */
		if (reqst->brw_len & ~CFS_PAGE_MASK) {
		if (reqst->brw_len & ~PAGE_MASK) {
			reply->brw_status = EINVAL;
			return 0;
		}
+2 −2
Original line number Diff line number Diff line
@@ -57,10 +57,10 @@ void policy_from_vma(ldlm_policy_data_t *policy,
		     struct vm_area_struct *vma, unsigned long addr,
		     size_t count)
{
	policy->l_extent.start = ((addr - vma->vm_start) & CFS_PAGE_MASK) +
	policy->l_extent.start = ((addr - vma->vm_start) & PAGE_MASK) +
				 (vma->vm_pgoff << PAGE_CACHE_SHIFT);
	policy->l_extent.end = (policy->l_extent.start + count - 1) |
			       ~CFS_PAGE_MASK;
			       ~PAGE_MASK;
}

struct vm_area_struct *our_vma(struct mm_struct *mm, unsigned long addr,
+4 −4
Original line number Diff line number Diff line
@@ -376,7 +376,7 @@ static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter,
		return -EBADF;

	/* FIXME: io smaller than PAGE_SIZE is broken on ia64 ??? */
	if ((file_offset & ~CFS_PAGE_MASK) || (count & ~CFS_PAGE_MASK))
	if ((file_offset & ~PAGE_MASK) || (count & ~PAGE_MASK))
		return -EINVAL;

	CDEBUG(D_VFSTRACE,
@@ -386,7 +386,7 @@ static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter,
	       MAX_DIO_SIZE >> PAGE_CACHE_SHIFT);

	/* Check that all user buffers are aligned as well */
	if (iov_iter_alignment(iter) & ~CFS_PAGE_MASK)
	if (iov_iter_alignment(iter) & ~PAGE_MASK)
		return -EINVAL;

	env = cl_env_get(&refcheck);
@@ -435,8 +435,8 @@ static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter,
			    size > (PAGE_CACHE_SIZE / sizeof(*pages)) *
				   PAGE_CACHE_SIZE) {
				size = ((((size / 2) - 1) |
					 ~CFS_PAGE_MASK) + 1) &
					CFS_PAGE_MASK;
					 ~PAGE_MASK) + 1) &
					PAGE_MASK;
				CDEBUG(D_VFSTRACE, "DIO size now %lu\n",
				       size);
				continue;
Loading