Patchwork [34/62] ext2: remove the second argument of k[un]map_atomic()

login
register
mail settings
Submitter Amerigo Wang
Date Nov. 27, 2011, 5:27 a.m.
Message ID <1322371662-26166-35-git-send-email-amwang@redhat.com>
Download mbox | patch
Permalink /patch/127851/
State Not Applicable
Headers show

Comments

Amerigo Wang - Nov. 27, 2011, 5:27 a.m.
Signed-off-by: Cong Wang <amwang@redhat.com>
---
 fs/ext2/dir.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Jan Kara - Nov. 28, 2011, 2:15 p.m.
On Sun 27-11-11 13:27:14, Cong Wang wrote:
> 
> Signed-off-by: Cong Wang <amwang@redhat.com>
  Acked-by: Jan Kara <jack@suse.cz>

									Honza

> ---
>  fs/ext2/dir.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c
> index 47cda41..378bf28 100644
> --- a/fs/ext2/dir.c
> +++ b/fs/ext2/dir.c
> @@ -645,7 +645,7 @@ int ext2_make_empty(struct inode *inode, struct inode *parent)
>  		unlock_page(page);
>  		goto fail;
>  	}
> -	kaddr = kmap_atomic(page, KM_USER0);
> +	kaddr = kmap_atomic(page);
>  	memset(kaddr, 0, chunk_size);
>  	de = (struct ext2_dir_entry_2 *)kaddr;
>  	de->name_len = 1;
> @@ -660,7 +660,7 @@ int ext2_make_empty(struct inode *inode, struct inode *parent)
>  	de->inode = cpu_to_le32(parent->i_ino);
>  	memcpy (de->name, "..\0", 4);
>  	ext2_set_de_type (de, inode);
> -	kunmap_atomic(kaddr, KM_USER0);
> +	kunmap_atomic(kaddr);
>  	err = ext2_commit_chunk(page, 0, chunk_size);
>  fail:
>  	page_cache_release(page);
> -- 
> 1.7.4.4
>

Patch

diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c
index 47cda41..378bf28 100644
--- a/fs/ext2/dir.c
+++ b/fs/ext2/dir.c
@@ -645,7 +645,7 @@  int ext2_make_empty(struct inode *inode, struct inode *parent)
 		unlock_page(page);
 		goto fail;
 	}
-	kaddr = kmap_atomic(page, KM_USER0);
+	kaddr = kmap_atomic(page);
 	memset(kaddr, 0, chunk_size);
 	de = (struct ext2_dir_entry_2 *)kaddr;
 	de->name_len = 1;
@@ -660,7 +660,7 @@  int ext2_make_empty(struct inode *inode, struct inode *parent)
 	de->inode = cpu_to_le32(parent->i_ino);
 	memcpy (de->name, "..\0", 4);
 	ext2_set_de_type (de, inode);
-	kunmap_atomic(kaddr, KM_USER0);
+	kunmap_atomic(kaddr);
 	err = ext2_commit_chunk(page, 0, chunk_size);
 fail:
 	page_cache_release(page);