aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ntfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ntfs/super.c')
-rw-r--r--fs/ntfs/super.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c
index f907611cca73..b341492542ca 100644
--- a/fs/ntfs/super.c
+++ b/fs/ntfs/super.c
@@ -2473,7 +2473,7 @@ static s64 get_nr_free_clusters(ntfs_volume *vol)
2473 nr_free -= PAGE_CACHE_SIZE * 8; 2473 nr_free -= PAGE_CACHE_SIZE * 8;
2474 continue; 2474 continue;
2475 } 2475 }
2476 kaddr = kmap_atomic(page, KM_USER0); 2476 kaddr = kmap_atomic(page);
2477 /* 2477 /*
2478 * Subtract the number of set bits. If this 2478 * Subtract the number of set bits. If this
2479 * is the last page and it is partial we don't really care as 2479 * 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)
2483 */ 2483 */
2484 nr_free -= bitmap_weight(kaddr, 2484 nr_free -= bitmap_weight(kaddr,
2485 PAGE_CACHE_SIZE * BITS_PER_BYTE); 2485 PAGE_CACHE_SIZE * BITS_PER_BYTE);
2486 kunmap_atomic(kaddr, KM_USER0); 2486 kunmap_atomic(kaddr);
2487 page_cache_release(page); 2487 page_cache_release(page);
2488 } 2488 }
2489 ntfs_debug("Finished reading $Bitmap, last index = 0x%lx.", index - 1); 2489 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,
2544 nr_free -= PAGE_CACHE_SIZE * 8; 2544 nr_free -= PAGE_CACHE_SIZE * 8;
2545 continue; 2545 continue;
2546 } 2546 }
2547 kaddr = kmap_atomic(page, KM_USER0); 2547 kaddr = kmap_atomic(page);
2548 /* 2548 /*
2549 * Subtract the number of set bits. If this 2549 * Subtract the number of set bits. If this
2550 * is the last page and it is partial we don't really care as 2550 * 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,
2554 */ 2554 */
2555 nr_free -= bitmap_weight(kaddr, 2555 nr_free -= bitmap_weight(kaddr,
2556 PAGE_CACHE_SIZE * BITS_PER_BYTE); 2556 PAGE_CACHE_SIZE * BITS_PER_BYTE);
2557 kunmap_atomic(kaddr, KM_USER0); 2557 kunmap_atomic(kaddr);
2558 page_cache_release(page); 2558 page_cache_release(page);
2559 } 2559 }
2560 ntfs_debug("Finished reading $MFT/$BITMAP, last index = 0x%lx.", 2560 ntfs_debug("Finished reading $MFT/$BITMAP, last index = 0x%lx.",
@@ -2908,9 +2908,10 @@ static int ntfs_fill_super(struct super_block *sb, void *opt, const int silent)
2908 ntfs_error(sb, "Failed to load system files."); 2908 ntfs_error(sb, "Failed to load system files.");
2909 goto unl_upcase_iput_tmp_ino_err_out_now; 2909 goto unl_upcase_iput_tmp_ino_err_out_now;
2910 } 2910 }
2911 if ((sb->s_root = d_alloc_root(vol->root_ino))) { 2911
2912 /* We grab a reference, simulating an ntfs_iget(). */ 2912 /* We grab a reference, simulating an ntfs_iget(). */
2913 ihold(vol->root_ino); 2913 ihold(vol->root_ino);
2914 if ((sb->s_root = d_make_root(vol->root_ino))) {
2914 ntfs_debug("Exiting, status successful."); 2915 ntfs_debug("Exiting, status successful.");
2915 /* Release the default upcase if it has no users. */ 2916 /* Release the default upcase if it has no users. */
2916 mutex_lock(&ntfs_lock); 2917 mutex_lock(&ntfs_lock);
@@ -3158,6 +3159,8 @@ static int __init init_ntfs_fs(void)
3158 } 3159 }
3159 printk(KERN_CRIT "NTFS: Failed to register NTFS filesystem driver!\n"); 3160 printk(KERN_CRIT "NTFS: Failed to register NTFS filesystem driver!\n");
3160 3161
3162 /* Unregister the ntfs sysctls. */
3163 ntfs_sysctl(0);
3161sysctl_err_out: 3164sysctl_err_out:
3162 kmem_cache_destroy(ntfs_big_inode_cache); 3165 kmem_cache_destroy(ntfs_big_inode_cache);
3163big_inode_err_out: 3166big_inode_err_out: