diff options
Diffstat (limited to 'fs/ntfs/super.c')
| -rw-r--r-- | fs/ntfs/super.c | 34 | 
1 files changed, 16 insertions, 18 deletions
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index 82650d52d91..6c3296e546c 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c @@ -19,6 +19,7 @@   * distribution in the file COPYING); if not, write to the Free Software   * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt  #include <linux/stddef.h>  #include <linux/init.h> @@ -49,8 +50,8 @@  static unsigned long ntfs_nr_compression_users;  /* A global default upcase table and a corresponding reference count. */ -static ntfschar *default_upcase = NULL; -static unsigned long ntfs_nr_upcase_users = 0; +static ntfschar *default_upcase; +static unsigned long ntfs_nr_upcase_users;  /* Error constants/strings used in inode.c::ntfs_show_options(). */  typedef enum { @@ -468,6 +469,8 @@ static int ntfs_remount(struct super_block *sb, int *flags, char *opt)  	ntfs_debug("Entering with remount options string: %s", opt); +	sync_filesystem(sb); +  #ifndef NTFS_RW  	/* For read-only compiled driver, enforce read-only flag. */  	*flags |= MS_RDONLY; @@ -1894,7 +1897,7 @@ get_ctx_vol_failed:  	vol->minor_ver = vi->minor_ver;  	ntfs_attr_put_search_ctx(ctx);  	unmap_mft_record(NTFS_I(vol->vol_ino)); -	printk(KERN_INFO "NTFS volume version %i.%i.\n", vol->major_ver, +	pr_info("volume version %i.%i.\n", vol->major_ver,  			vol->minor_ver);  	if (vol->major_ver < 3 && NVolSparseEnabled(vol)) {  		ntfs_warning(vol->sb, "Disabling sparse support due to NTFS " @@ -3093,7 +3096,7 @@ static int __init init_ntfs_fs(void)  	int err = 0;  	/* This may be ugly but it results in pretty output so who cares. (-8 */ -	printk(KERN_INFO "NTFS driver " NTFS_VERSION " [Flags: R/" +	pr_info("driver " NTFS_VERSION " [Flags: R/"  #ifdef NTFS_RW  			"W"  #else @@ -3113,16 +3116,15 @@ static int __init init_ntfs_fs(void)  			sizeof(ntfs_index_context), 0 /* offset */,  			SLAB_HWCACHE_ALIGN, NULL /* ctor */);  	if (!ntfs_index_ctx_cache) { -		printk(KERN_CRIT "NTFS: Failed to create %s!\n", -				ntfs_index_ctx_cache_name); +		pr_crit("Failed to create %s!\n", ntfs_index_ctx_cache_name);  		goto ictx_err_out;  	}  	ntfs_attr_ctx_cache = kmem_cache_create(ntfs_attr_ctx_cache_name,  			sizeof(ntfs_attr_search_ctx), 0 /* offset */,  			SLAB_HWCACHE_ALIGN, NULL /* ctor */);  	if (!ntfs_attr_ctx_cache) { -		printk(KERN_CRIT "NTFS: Failed to create %s!\n", -				ntfs_attr_ctx_cache_name); +		pr_crit("NTFS: Failed to create %s!\n", +			ntfs_attr_ctx_cache_name);  		goto actx_err_out;  	} @@ -3130,8 +3132,7 @@ static int __init init_ntfs_fs(void)  			(NTFS_MAX_NAME_LEN+1) * sizeof(ntfschar), 0,  			SLAB_HWCACHE_ALIGN, NULL);  	if (!ntfs_name_cache) { -		printk(KERN_CRIT "NTFS: Failed to create %s!\n", -				ntfs_name_cache_name); +		pr_crit("Failed to create %s!\n", ntfs_name_cache_name);  		goto name_err_out;  	} @@ -3139,8 +3140,7 @@ static int __init init_ntfs_fs(void)  			sizeof(ntfs_inode), 0,  			SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, NULL);  	if (!ntfs_inode_cache) { -		printk(KERN_CRIT "NTFS: Failed to create %s!\n", -				ntfs_inode_cache_name); +		pr_crit("Failed to create %s!\n", ntfs_inode_cache_name);  		goto inode_err_out;  	} @@ -3149,15 +3149,14 @@ static int __init init_ntfs_fs(void)  			SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD,  			ntfs_big_inode_init_once);  	if (!ntfs_big_inode_cache) { -		printk(KERN_CRIT "NTFS: Failed to create %s!\n", -				ntfs_big_inode_cache_name); +		pr_crit("Failed to create %s!\n", ntfs_big_inode_cache_name);  		goto big_inode_err_out;  	}  	/* Register the ntfs sysctls. */  	err = ntfs_sysctl(1);  	if (err) { -		printk(KERN_CRIT "NTFS: Failed to register NTFS sysctls!\n"); +		pr_crit("Failed to register NTFS sysctls!\n");  		goto sysctl_err_out;  	} @@ -3166,7 +3165,7 @@ static int __init init_ntfs_fs(void)  		ntfs_debug("NTFS driver registered successfully.");  		return 0; /* Success! */  	} -	printk(KERN_CRIT "NTFS: Failed to register NTFS filesystem driver!\n"); +	pr_crit("Failed to register NTFS filesystem driver!\n");  	/* Unregister the ntfs sysctls. */  	ntfs_sysctl(0); @@ -3182,8 +3181,7 @@ actx_err_out:  	kmem_cache_destroy(ntfs_index_ctx_cache);  ictx_err_out:  	if (!err) { -		printk(KERN_CRIT "NTFS: Aborting NTFS filesystem driver " -				"registration...\n"); +		pr_crit("Aborting NTFS filesystem driver registration...\n");  		err = -ENOMEM;  	}  	return err;  | 
