Skip to content

Commit

Permalink
staging/lustre: remove the second argument of ll_kmap_atomic()
Browse files Browse the repository at this point in the history
kmap_atomic allows only one argument now, just remove the second.

Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Zhao Hongjiang authored and Greg Kroah-Hartman committed Jul 23, 2013
1 parent 22eb2c3 commit 5e8ebf1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 0 additions & 3 deletions drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,6 @@ static inline int ll_quota_off(struct super_block *sb, int off, int remount)
#define queue_max_phys_segments(rq) queue_max_segments(rq)
#define queue_max_hw_segments(rq) queue_max_segments(rq)

#define ll_kmap_atomic(a, b) kmap_atomic(a)
#define ll_kunmap_atomic(a, b) kunmap_atomic(a)


#define ll_d_hlist_node hlist_node
#define ll_d_hlist_empty(list) hlist_empty(list)
Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/lustre/lustre/llite/rw26.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,11 @@ ssize_t ll_direct_rw_pages(const struct lu_env *env, struct cl_io *io,
src_page = (rw == WRITE) ? pages[i] : vmpage;
dst_page = (rw == WRITE) ? vmpage : pages[i];

src = ll_kmap_atomic(src_page, KM_USER0);
dst = ll_kmap_atomic(dst_page, KM_USER1);
src = kmap_atomic(src_page);
dst = kmap_atomic(dst_page);
memcpy(dst, src, min(page_size, size));
ll_kunmap_atomic(dst, KM_USER1);
ll_kunmap_atomic(src, KM_USER0);
kunmap_atomic(dst);
kunmap_atomic(src);

/* make sure page will be added to the transfer by
* cl_io_submit()->...->vvp_page_prep_write(). */
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/lustre/lustre/llite/vvp_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -887,10 +887,10 @@ static int vvp_io_prepare_partial(const struct lu_env *env, struct cl_io *io,
* purposes here we can treat it like i_size.
*/
if (attr->cat_kms <= offset) {
char *kaddr = ll_kmap_atomic(cp->cpg_page, KM_USER0);
char *kaddr = kmap_atomic(cp->cpg_page);

memset(kaddr, 0, cl_page_size(obj));
ll_kunmap_atomic(kaddr, KM_USER0);
kunmap_atomic(kaddr);
} else if (cp->cpg_defer_uptodate)
cp->cpg_ra_used = 1;
else
Expand Down

0 comments on commit 5e8ebf1

Please sign in to comment.