From a3ac1414eb601136ba3475e841fe76ccbab5e88d Mon Sep 17 00:00:00 2001 From: Cong Wang Date: Fri, 25 Nov 2011 23:14:34 +0800 Subject: ntfs: remove the second argument of k[un]map_atomic() Signed-off-by: Cong Wang --- fs/ntfs/super.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fs/ntfs/super.c') diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index f907611cca7..28d4e6ab663 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c @@ -2473,7 +2473,7 @@ static s64 get_nr_free_clusters(ntfs_volume *vol) nr_free -= PAGE_CACHE_SIZE * 8; continue; } - kaddr = kmap_atomic(page, KM_USER0); + kaddr = kmap_atomic(page); /* * Subtract the number of set bits. If this * is the last page and it is partial we don't really care as @@ -2483,7 +2483,7 @@ static s64 get_nr_free_clusters(ntfs_volume *vol) */ nr_free -= bitmap_weight(kaddr, PAGE_CACHE_SIZE * BITS_PER_BYTE); - kunmap_atomic(kaddr, KM_USER0); + kunmap_atomic(kaddr); page_cache_release(page); } ntfs_debug("Finished reading $Bitmap, last index = 0x%lx.", index - 1); @@ -2544,7 +2544,7 @@ static unsigned long __get_nr_free_mft_records(ntfs_volume *vol, nr_free -= PAGE_CACHE_SIZE * 8; continue; } - kaddr = kmap_atomic(page, KM_USER0); + kaddr = kmap_atomic(page); /* * Subtract the number of set bits. If this * is the last page and it is partial we don't really care as @@ -2554,7 +2554,7 @@ static unsigned long __get_nr_free_mft_records(ntfs_volume *vol, */ nr_free -= bitmap_weight(kaddr, PAGE_CACHE_SIZE * BITS_PER_BYTE); - kunmap_atomic(kaddr, KM_USER0); + kunmap_atomic(kaddr); page_cache_release(page); } ntfs_debug("Finished reading $MFT/$BITMAP, last index = 0x%lx.", -- cgit v1.2.3-70-g09d2 From ea29c6950a0305f2af7fd4a2021a6e946ada0174 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 12 Feb 2012 22:04:09 -0500 Subject: ntfs: switch to d_make_root() Signed-off-by: Al Viro --- fs/ntfs/super.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'fs/ntfs/super.c') diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index f907611cca7..22020d8b1ed 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c @@ -2908,9 +2908,10 @@ static int ntfs_fill_super(struct super_block *sb, void *opt, const int silent) ntfs_error(sb, "Failed to load system files."); goto unl_upcase_iput_tmp_ino_err_out_now; } - if ((sb->s_root = d_alloc_root(vol->root_ino))) { - /* We grab a reference, simulating an ntfs_iget(). */ - ihold(vol->root_ino); + + /* We grab a reference, simulating an ntfs_iget(). */ + ihold(vol->root_ino); + if ((sb->s_root = d_make_root(vol->root_ino))) { ntfs_debug("Exiting, status successful."); /* Release the default upcase if it has no users. */ mutex_lock(&ntfs_lock); -- cgit v1.2.3-70-g09d2 From f4c5499d2cbe54f0470764acfd0faf4e965aa7e9 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 17 Mar 2012 18:19:57 -0400 Subject: ntfs: forgets to unregister sysctls on register_filesystem() failure Signed-off-by: Al Viro --- fs/ntfs/super.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/ntfs/super.c') diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index 22020d8b1ed..3502a9e8f0a 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c @@ -3159,6 +3159,8 @@ static int __init init_ntfs_fs(void) } printk(KERN_CRIT "NTFS: Failed to register NTFS filesystem driver!\n"); + /* Unregister the ntfs sysctls. */ + ntfs_sysctl(0); sysctl_err_out: kmem_cache_destroy(ntfs_big_inode_cache); big_inode_err_out: -- cgit v1.2.3-70-g09d2