diff options
Diffstat (limited to 'fs/cachefiles')
| -rw-r--r-- | fs/cachefiles/bind.c | 18 | ||||
| -rw-r--r-- | fs/cachefiles/daemon.c | 31 | ||||
| -rw-r--r-- | fs/cachefiles/interface.c | 9 | ||||
| -rw-r--r-- | fs/cachefiles/internal.h | 30 | ||||
| -rw-r--r-- | fs/cachefiles/main.c | 9 | ||||
| -rw-r--r-- | fs/cachefiles/namei.c | 62 | ||||
| -rw-r--r-- | fs/cachefiles/rdwr.c | 33 | ||||
| -rw-r--r-- | fs/cachefiles/security.c | 10 | ||||
| -rw-r--r-- | fs/cachefiles/xattr.c | 10 | 
9 files changed, 97 insertions, 115 deletions
diff --git a/fs/cachefiles/bind.c b/fs/cachefiles/bind.c index 622f4696e48..d749731dc0e 100644 --- a/fs/cachefiles/bind.c +++ b/fs/cachefiles/bind.c @@ -50,18 +50,18 @@ int cachefiles_daemon_bind(struct cachefiles_cache *cache, char *args)  	       cache->brun_percent  < 100);  	if (*args) { -		kerror("'bind' command doesn't take an argument"); +		pr_err("'bind' command doesn't take an argument");  		return -EINVAL;  	}  	if (!cache->rootdirname) { -		kerror("No cache directory specified"); +		pr_err("No cache directory specified");  		return -EINVAL;  	}  	/* don't permit already bound caches to be re-bound */  	if (test_bit(CACHEFILES_READY, &cache->flags)) { -		kerror("Cache already bound"); +		pr_err("Cache already bound");  		return -EBUSY;  	} @@ -124,7 +124,6 @@ static int cachefiles_daemon_add_cache(struct cachefiles_cache *cache)  	/* check parameters */  	ret = -EOPNOTSUPP;  	if (!root->d_inode || -	    !root->d_inode->i_op ||  	    !root->d_inode->i_op->lookup ||  	    !root->d_inode->i_op->mkdir ||  	    !root->d_inode->i_op->setxattr || @@ -229,9 +228,7 @@ static int cachefiles_daemon_add_cache(struct cachefiles_cache *cache)  	set_bit(CACHEFILES_READY, &cache->flags);  	dput(root); -	printk(KERN_INFO "CacheFiles:" -	       " File cache on %s registered\n", -	       cache->cache.identifier); +	pr_info("File cache on %s registered\n", cache->cache.identifier);  	/* check how much space the cache has */  	cachefiles_has_space(cache, 0, 0); @@ -251,7 +248,7 @@ error_open_root:  	kmem_cache_free(cachefiles_object_jar, fsdef);  error_root_object:  	cachefiles_end_secure(cache, saved_cred); -	kerror("Failed to register: %d", ret); +	pr_err("Failed to register: %d", ret);  	return ret;  } @@ -263,9 +260,8 @@ void cachefiles_daemon_unbind(struct cachefiles_cache *cache)  	_enter("");  	if (test_bit(CACHEFILES_READY, &cache->flags)) { -		printk(KERN_INFO "CacheFiles:" -		       " File cache on %s unregistering\n", -		       cache->cache.identifier); +		pr_info("File cache on %s unregistering\n", +			cache->cache.identifier);  		fscache_withdraw_cache(&cache->cache);  	} diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c index 0a1467b1551..b078d3081d6 100644 --- a/fs/cachefiles/daemon.c +++ b/fs/cachefiles/daemon.c @@ -315,8 +315,7 @@ static unsigned int cachefiles_daemon_poll(struct file *file,  static int cachefiles_daemon_range_error(struct cachefiles_cache *cache,  					 char *args)  { -	kerror("Free space limits must be in range" -	       " 0%%<=stop<cull<run<100%%"); +	pr_err("Free space limits must be in range 0%%<=stop<cull<run<100%%");  	return -EINVAL;  } @@ -476,12 +475,12 @@ static int cachefiles_daemon_dir(struct cachefiles_cache *cache, char *args)  	_enter(",%s", args);  	if (!*args) { -		kerror("Empty directory specified"); +		pr_err("Empty directory specified");  		return -EINVAL;  	}  	if (cache->rootdirname) { -		kerror("Second cache directory specified"); +		pr_err("Second cache directory specified");  		return -EEXIST;  	} @@ -504,12 +503,12 @@ static int cachefiles_daemon_secctx(struct cachefiles_cache *cache, char *args)  	_enter(",%s", args);  	if (!*args) { -		kerror("Empty security context specified"); +		pr_err("Empty security context specified");  		return -EINVAL;  	}  	if (cache->secctx) { -		kerror("Second security context specified"); +		pr_err("Second security context specified");  		return -EINVAL;  	} @@ -532,7 +531,7 @@ static int cachefiles_daemon_tag(struct cachefiles_cache *cache, char *args)  	_enter(",%s", args);  	if (!*args) { -		kerror("Empty tag specified"); +		pr_err("Empty tag specified");  		return -EINVAL;  	} @@ -563,12 +562,12 @@ static int cachefiles_daemon_cull(struct cachefiles_cache *cache, char *args)  		goto inval;  	if (!test_bit(CACHEFILES_READY, &cache->flags)) { -		kerror("cull applied to unready cache"); +		pr_err("cull applied to unready cache");  		return -EIO;  	}  	if (test_bit(CACHEFILES_DEAD, &cache->flags)) { -		kerror("cull applied to dead cache"); +		pr_err("cull applied to dead cache");  		return -EIO;  	} @@ -588,11 +587,11 @@ static int cachefiles_daemon_cull(struct cachefiles_cache *cache, char *args)  notdir:  	path_put(&path); -	kerror("cull command requires dirfd to be a directory"); +	pr_err("cull command requires dirfd to be a directory");  	return -ENOTDIR;  inval: -	kerror("cull command requires dirfd and filename"); +	pr_err("cull command requires dirfd and filename");  	return -EINVAL;  } @@ -615,7 +614,7 @@ static int cachefiles_daemon_debug(struct cachefiles_cache *cache, char *args)  	return 0;  inval: -	kerror("debug command requires mask"); +	pr_err("debug command requires mask");  	return -EINVAL;  } @@ -635,12 +634,12 @@ static int cachefiles_daemon_inuse(struct cachefiles_cache *cache, char *args)  		goto inval;  	if (!test_bit(CACHEFILES_READY, &cache->flags)) { -		kerror("inuse applied to unready cache"); +		pr_err("inuse applied to unready cache");  		return -EIO;  	}  	if (test_bit(CACHEFILES_DEAD, &cache->flags)) { -		kerror("inuse applied to dead cache"); +		pr_err("inuse applied to dead cache");  		return -EIO;  	} @@ -660,11 +659,11 @@ static int cachefiles_daemon_inuse(struct cachefiles_cache *cache, char *args)  notdir:  	path_put(&path); -	kerror("inuse command requires dirfd to be a directory"); +	pr_err("inuse command requires dirfd to be a directory");  	return -ENOTDIR;  inval: -	kerror("inuse command requires dirfd and filename"); +	pr_err("inuse command requires dirfd and filename");  	return -EINVAL;  } diff --git a/fs/cachefiles/interface.c b/fs/cachefiles/interface.c index 43eb5592cde..584743d456c 100644 --- a/fs/cachefiles/interface.c +++ b/fs/cachefiles/interface.c @@ -146,8 +146,7 @@ static int cachefiles_lookup_object(struct fscache_object *_object)  	if (ret < 0 && ret != -ETIMEDOUT) {  		if (ret != -ENOBUFS) -			printk(KERN_WARNING -			       "CacheFiles: Lookup failed error %d\n", ret); +			pr_warn("Lookup failed error %d\n", ret);  		fscache_object_lookup_error(&object->fscache);  	} @@ -270,7 +269,7 @@ static void cachefiles_drop_object(struct fscache_object *_object)  #endif  	/* delete retired objects */ -	if (test_bit(FSCACHE_COOKIE_RETIRED, &object->fscache.cookie->flags) && +	if (test_bit(FSCACHE_OBJECT_RETIRED, &object->fscache.flags) &&  	    _object != cache->cache.fsdef  	    ) {  		_debug("- retire object OBJ%x", object->fscache.debug_id); @@ -449,14 +448,14 @@ static int cachefiles_attr_changed(struct fscache_object *_object)  		_debug("discard tail %llx", oi_size);  		newattrs.ia_valid = ATTR_SIZE;  		newattrs.ia_size = oi_size & PAGE_MASK; -		ret = notify_change(object->backer, &newattrs); +		ret = notify_change(object->backer, &newattrs, NULL);  		if (ret < 0)  			goto truncate_failed;  	}  	newattrs.ia_valid = ATTR_SIZE;  	newattrs.ia_size = ni_size; -	ret = notify_change(object->backer, &newattrs); +	ret = notify_change(object->backer, &newattrs, NULL);  truncate_failed:  	mutex_unlock(&object->backer->d_inode->i_mutex); diff --git a/fs/cachefiles/internal.h b/fs/cachefiles/internal.h index 5349473df1b..3d50998abf5 100644 --- a/fs/cachefiles/internal.h +++ b/fs/cachefiles/internal.h @@ -9,6 +9,13 @@   * 2 of the Licence, or (at your option) any later version.   */ +#ifdef pr_fmt +#undef pr_fmt +#endif + +#define pr_fmt(fmt) "CacheFiles: " fmt + +  #include <linux/fscache-cache.h>  #include <linux/timer.h>  #include <linux/wait.h> @@ -245,11 +252,10 @@ extern int cachefiles_remove_object_xattr(struct cachefiles_cache *cache,  /*   * error handling   */ -#define kerror(FMT, ...) printk(KERN_ERR "CacheFiles: "FMT"\n", ##__VA_ARGS__)  #define cachefiles_io_error(___cache, FMT, ...)		\  do {							\ -	kerror("I/O Error: " FMT, ##__VA_ARGS__);	\ +	pr_err("I/O Error: " FMT, ##__VA_ARGS__);	\  	fscache_io_error(&(___cache)->cache);		\  	set_bit(CACHEFILES_DEAD, &(___cache)->flags);	\  } while (0) @@ -310,8 +316,8 @@ do {							\  #define ASSERT(X)							\  do {									\  	if (unlikely(!(X))) {						\ -		printk(KERN_ERR "\n");					\ -		printk(KERN_ERR "CacheFiles: Assertion failed\n");	\ +		pr_err("\n");						\ +		pr_err("Assertion failed\n");		\  		BUG();							\  	}								\  } while (0) @@ -319,9 +325,9 @@ do {									\  #define ASSERTCMP(X, OP, Y)						\  do {									\  	if (unlikely(!((X) OP (Y)))) {					\ -		printk(KERN_ERR "\n");					\ -		printk(KERN_ERR "CacheFiles: Assertion failed\n");	\ -		printk(KERN_ERR "%lx " #OP " %lx is false\n",		\ +		pr_err("\n");						\ +		pr_err("Assertion failed\n");		\ +		pr_err("%lx " #OP " %lx is false\n",			\  		       (unsigned long)(X), (unsigned long)(Y));		\  		BUG();							\  	}								\ @@ -330,8 +336,8 @@ do {									\  #define ASSERTIF(C, X)							\  do {									\  	if (unlikely((C) && !(X))) {					\ -		printk(KERN_ERR "\n");					\ -		printk(KERN_ERR "CacheFiles: Assertion failed\n");	\ +		pr_err("\n");						\ +		pr_err("Assertion failed\n");		\  		BUG();							\  	}								\  } while (0) @@ -339,9 +345,9 @@ do {									\  #define ASSERTIFCMP(C, X, OP, Y)					\  do {									\  	if (unlikely((C) && !((X) OP (Y)))) {				\ -		printk(KERN_ERR "\n");					\ -		printk(KERN_ERR "CacheFiles: Assertion failed\n");	\ -		printk(KERN_ERR "%lx " #OP " %lx is false\n",		\ +		pr_err("\n");						\ +		pr_err("Assertion failed\n");		\ +		pr_err("%lx " #OP " %lx is false\n",			\  		       (unsigned long)(X), (unsigned long)(Y));		\  		BUG();							\  	}								\ diff --git a/fs/cachefiles/main.c b/fs/cachefiles/main.c index 4bfa8cf43bf..180edfb45f6 100644 --- a/fs/cachefiles/main.c +++ b/fs/cachefiles/main.c @@ -68,8 +68,7 @@ static int __init cachefiles_init(void)  				  SLAB_HWCACHE_ALIGN,  				  cachefiles_object_init_once);  	if (!cachefiles_object_jar) { -		printk(KERN_NOTICE -		       "CacheFiles: Failed to allocate an object jar\n"); +		pr_notice("Failed to allocate an object jar\n");  		goto error_object_jar;  	} @@ -77,7 +76,7 @@ static int __init cachefiles_init(void)  	if (ret < 0)  		goto error_proc; -	printk(KERN_INFO "CacheFiles: Loaded\n"); +	pr_info("Loaded\n");  	return 0;  error_proc: @@ -85,7 +84,7 @@ error_proc:  error_object_jar:  	misc_deregister(&cachefiles_dev);  error_dev: -	kerror("failed to register: %d", ret); +	pr_err("failed to register: %d", ret);  	return ret;  } @@ -96,7 +95,7 @@ fs_initcall(cachefiles_init);   */  static void __exit cachefiles_exit(void)  { -	printk(KERN_INFO "CacheFiles: Unloading\n"); +	pr_info("Unloading\n");  	cachefiles_proc_cleanup();  	kmem_cache_destroy(cachefiles_object_jar); diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index f4a08d7fa2f..5bf2b41e66d 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c @@ -35,22 +35,21 @@ void __cachefiles_printk_object(struct cachefiles_object *object,  	struct fscache_cookie *cookie;  	unsigned keylen, loop; -	printk(KERN_ERR "%sobject: OBJ%x\n", -	       prefix, object->fscache.debug_id); -	printk(KERN_ERR "%sobjstate=%s fl=%lx wbusy=%x ev=%lx[%lx]\n", +	pr_err("%sobject: OBJ%x\n", prefix, object->fscache.debug_id); +	pr_err("%sobjstate=%s fl=%lx wbusy=%x ev=%lx[%lx]\n",  	       prefix, object->fscache.state->name,  	       object->fscache.flags, work_busy(&object->fscache.work),  	       object->fscache.events, object->fscache.event_mask); -	printk(KERN_ERR "%sops=%u inp=%u exc=%u\n", +	pr_err("%sops=%u inp=%u exc=%u\n",  	       prefix, object->fscache.n_ops, object->fscache.n_in_progress,  	       object->fscache.n_exclusive); -	printk(KERN_ERR "%sparent=%p\n", +	pr_err("%sparent=%p\n",  	       prefix, object->fscache.parent);  	spin_lock(&object->fscache.lock);  	cookie = object->fscache.cookie;  	if (cookie) { -		printk(KERN_ERR "%scookie=%p [pr=%p nd=%p fl=%lx]\n", +		pr_err("%scookie=%p [pr=%p nd=%p fl=%lx]\n",  		       prefix,  		       object->fscache.cookie,  		       object->fscache.cookie->parent, @@ -62,16 +61,16 @@ void __cachefiles_printk_object(struct cachefiles_object *object,  		else  			keylen = 0;  	} else { -		printk(KERN_ERR "%scookie=NULL\n", prefix); +		pr_err("%scookie=NULL\n", prefix);  		keylen = 0;  	}  	spin_unlock(&object->fscache.lock);  	if (keylen) { -		printk(KERN_ERR "%skey=[%u] '", prefix, keylen); +		pr_err("%skey=[%u] '", prefix, keylen);  		for (loop = 0; loop < keylen; loop++) -			printk("%02x", keybuf[loop]); -		printk("'\n"); +			pr_cont("%02x", keybuf[loop]); +		pr_cont("'\n");  	}  } @@ -131,13 +130,11 @@ found_dentry:  	       dentry);  	if (fscache_object_is_live(&object->fscache)) { -		printk(KERN_ERR "\n"); -		printk(KERN_ERR "CacheFiles: Error:" -		       " Can't preemptively bury live object\n"); +		pr_err("\n"); +		pr_err("Error: Can't preemptively bury live object\n");  		cachefiles_printk_object(object, NULL);  	} else if (test_and_set_bit(CACHEFILES_OBJECT_BURIED, &object->flags)) { -		printk(KERN_ERR "CacheFiles: Error:" -		       " Object already preemptively buried\n"); +		pr_err("Error: Object already preemptively buried\n");  	}  	write_unlock(&cache->active_lock); @@ -160,7 +157,7 @@ try_again:  	write_lock(&cache->active_lock);  	if (test_and_set_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags)) { -		printk(KERN_ERR "CacheFiles: Error: Object already active\n"); +		pr_err("Error: Object already active\n");  		cachefiles_printk_object(object, NULL);  		BUG();  	} @@ -193,9 +190,8 @@ try_again:  	 * need to wait for it to be destroyed */  wait_for_old_object:  	if (fscache_object_is_live(&object->fscache)) { -		printk(KERN_ERR "\n"); -		printk(KERN_ERR "CacheFiles: Error:" -		       " Unexpected object collision\n"); +		pr_err("\n"); +		pr_err("Error: Unexpected object collision\n");  		cachefiles_printk_object(object, xobject);  		BUG();  	} @@ -241,9 +237,8 @@ wait_for_old_object:  		}  		if (timeout <= 0) { -			printk(KERN_ERR "\n"); -			printk(KERN_ERR "CacheFiles: Error: Overlong" -			       " wait for old active object to go away\n"); +			pr_err("\n"); +			pr_err("Error: Overlong wait for old active object to go away\n");  			cachefiles_printk_object(object, xobject);  			goto requeue;  		} @@ -294,7 +289,7 @@ static int cachefiles_bury_object(struct cachefiles_cache *cache,  		if (ret < 0) {  			cachefiles_io_error(cache, "Unlink security error");  		} else { -			ret = vfs_unlink(dir->d_inode, rep); +			ret = vfs_unlink(dir->d_inode, rep, NULL);  			if (preemptive)  				cachefiles_mark_object_buried(cache, rep); @@ -391,12 +386,12 @@ try_again:  	path.dentry = dir;  	path_to_graveyard.mnt = cache->mnt;  	path_to_graveyard.dentry = cache->graveyard; -	ret = security_path_rename(&path, rep, &path_to_graveyard, grave); +	ret = security_path_rename(&path, rep, &path_to_graveyard, grave, 0);  	if (ret < 0) {  		cachefiles_io_error(cache, "Rename security error %d", ret);  	} else {  		ret = vfs_rename(dir->d_inode, rep, -				 cache->graveyard->d_inode, grave); +				 cache->graveyard->d_inode, grave, NULL, 0);  		if (ret != 0 && ret != -ENOMEM)  			cachefiles_io_error(cache,  					    "Rename failed with error %d", ret); @@ -548,7 +543,7 @@ lookup_again:  			       next, next->d_inode, next->d_inode->i_ino);  		} else if (!S_ISDIR(next->d_inode->i_mode)) { -			kerror("inode %lu is not a directory", +			pr_err("inode %lu is not a directory",  			       next->d_inode->i_ino);  			ret = -ENOBUFS;  			goto error; @@ -579,7 +574,7 @@ lookup_again:  		} else if (!S_ISDIR(next->d_inode->i_mode) &&  			   !S_ISREG(next->d_inode->i_mode)  			   ) { -			kerror("inode %lu is not a file or directory", +			pr_err("inode %lu is not a file or directory",  			       next->d_inode->i_ino);  			ret = -ENOBUFS;  			goto error; @@ -773,14 +768,13 @@ struct dentry *cachefiles_get_directory(struct cachefiles_cache *cache,  	ASSERT(subdir->d_inode);  	if (!S_ISDIR(subdir->d_inode->i_mode)) { -		kerror("%s is not a directory", dirname); +		pr_err("%s is not a directory", dirname);  		ret = -EIO;  		goto check_error;  	}  	ret = -EPERM; -	if (!subdir->d_inode->i_op || -	    !subdir->d_inode->i_op->setxattr || +	if (!subdir->d_inode->i_op->setxattr ||  	    !subdir->d_inode->i_op->getxattr ||  	    !subdir->d_inode->i_op->lookup ||  	    !subdir->d_inode->i_op->mkdir || @@ -801,13 +795,13 @@ check_error:  mkdir_error:  	mutex_unlock(&dir->d_inode->i_mutex);  	dput(subdir); -	kerror("mkdir %s failed with error %d", dirname, ret); +	pr_err("mkdir %s failed with error %d", dirname, ret);  	return ERR_PTR(ret);  lookup_error:  	mutex_unlock(&dir->d_inode->i_mutex);  	ret = PTR_ERR(subdir); -	kerror("Lookup %s failed with error %d", dirname, ret); +	pr_err("Lookup %s failed with error %d", dirname, ret);  	return ERR_PTR(ret);  nomem_d_alloc: @@ -897,7 +891,7 @@ lookup_error:  	if (ret == -EIO) {  		cachefiles_io_error(cache, "Lookup failed");  	} else if (ret != -ENOMEM) { -		kerror("Internal error: %d", ret); +		pr_err("Internal error: %d", ret);  		ret = -EIO;  	} @@ -956,7 +950,7 @@ error:  	}  	if (ret != -ENOMEM) { -		kerror("Internal error: %d", ret); +		pr_err("Internal error: %d", ret);  		ret = -EIO;  	} diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c index ebaff368120..4b1fb5ca65b 100644 --- a/fs/cachefiles/rdwr.c +++ b/fs/cachefiles/rdwr.c @@ -265,24 +265,22 @@ static int cachefiles_read_backing_file_one(struct cachefiles_object *object,  				goto nomem_monitor;  		} -		ret = add_to_page_cache(newpage, bmapping, -					netpage->index, cachefiles_gfp); +		ret = add_to_page_cache_lru(newpage, bmapping, +					    netpage->index, cachefiles_gfp);  		if (ret == 0)  			goto installed_new_backing_page;  		if (ret != -EEXIST)  			goto nomem_page;  	} -	/* we've installed a new backing page, so now we need to add it -	 * to the LRU list and start it reading */ +	/* we've installed a new backing page, so now we need to start +	 * it reading */  installed_new_backing_page:  	_debug("- new %p", newpage);  	backpage = newpage;  	newpage = NULL; -	lru_cache_add_file(backpage); -  read_backing_page:  	ret = bmapping->a_ops->readpage(NULL, backpage);  	if (ret < 0) @@ -510,24 +508,23 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object,  					goto nomem;  			} -			ret = add_to_page_cache(newpage, bmapping, -						netpage->index, cachefiles_gfp); +			ret = add_to_page_cache_lru(newpage, bmapping, +						    netpage->index, +						    cachefiles_gfp);  			if (ret == 0)  				goto installed_new_backing_page;  			if (ret != -EEXIST)  				goto nomem;  		} -		/* we've installed a new backing page, so now we need to add it -		 * to the LRU list and start it reading */ +		/* we've installed a new backing page, so now we need +		 * to start it reading */  	installed_new_backing_page:  		_debug("- new %p", newpage);  		backpage = newpage;  		newpage = NULL; -		lru_cache_add_file(backpage); -  	reread_backing_page:  		ret = bmapping->a_ops->readpage(NULL, backpage);  		if (ret < 0) @@ -538,8 +535,8 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object,  	monitor_backing_page:  		_debug("- monitor add"); -		ret = add_to_page_cache(netpage, op->mapping, netpage->index, -					cachefiles_gfp); +		ret = add_to_page_cache_lru(netpage, op->mapping, +					    netpage->index, cachefiles_gfp);  		if (ret < 0) {  			if (ret == -EEXIST) {  				page_cache_release(netpage); @@ -549,8 +546,6 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object,  			goto nomem;  		} -		lru_cache_add_file(netpage); -  		/* install a monitor */  		page_cache_get(netpage);  		monitor->netfs_page = netpage; @@ -613,8 +608,8 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object,  	backing_page_already_uptodate:  		_debug("- uptodate"); -		ret = add_to_page_cache(netpage, op->mapping, netpage->index, -					cachefiles_gfp); +		ret = add_to_page_cache_lru(netpage, op->mapping, +					    netpage->index, cachefiles_gfp);  		if (ret < 0) {  			if (ret == -EEXIST) {  				page_cache_release(netpage); @@ -631,8 +626,6 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object,  		fscache_mark_page_cached(op, netpage); -		lru_cache_add_file(netpage); -  		/* the netpage is unlocked and marked up to date here */  		fscache_end_io(op, netpage, 0);  		page_cache_release(netpage); diff --git a/fs/cachefiles/security.c b/fs/cachefiles/security.c index 039b5011d83..396c18ea276 100644 --- a/fs/cachefiles/security.c +++ b/fs/cachefiles/security.c @@ -34,9 +34,7 @@ int cachefiles_get_security_ID(struct cachefiles_cache *cache)  		ret = set_security_override_from_ctx(new, cache->secctx);  		if (ret < 0) {  			put_cred(new); -			printk(KERN_ERR "CacheFiles:" -			       " Security denies permission to nominate" -			       " security context: error %d\n", +			pr_err("Security denies permission to nominate security context: error %d\n",  			       ret);  			goto error;  		} @@ -59,16 +57,14 @@ static int cachefiles_check_cache_dir(struct cachefiles_cache *cache,  	ret = security_inode_mkdir(root->d_inode, root, 0);  	if (ret < 0) { -		printk(KERN_ERR "CacheFiles:" -		       " Security denies permission to make dirs: error %d", +		pr_err("Security denies permission to make dirs: error %d",  		       ret);  		return ret;  	}  	ret = security_inode_create(root->d_inode, root, 0);  	if (ret < 0) -		printk(KERN_ERR "CacheFiles:" -		       " Security denies permission to create files: error %d", +		pr_err("Security denies permission to create files: error %d",  		       ret);  	return ret; diff --git a/fs/cachefiles/xattr.c b/fs/cachefiles/xattr.c index 12b0eef8418..1ad51ffbb27 100644 --- a/fs/cachefiles/xattr.c +++ b/fs/cachefiles/xattr.c @@ -51,7 +51,7 @@ int cachefiles_check_object_type(struct cachefiles_object *object)  	}  	if (ret != -EEXIST) { -		kerror("Can't set xattr on %*.*s [%lu] (err %d)", +		pr_err("Can't set xattr on %*.*s [%lu] (err %d)",  		       dentry->d_name.len, dentry->d_name.len,  		       dentry->d_name.name, dentry->d_inode->i_ino,  		       -ret); @@ -64,7 +64,7 @@ int cachefiles_check_object_type(struct cachefiles_object *object)  		if (ret == -ERANGE)  			goto bad_type_length; -		kerror("Can't read xattr on %*.*s [%lu] (err %d)", +		pr_err("Can't read xattr on %*.*s [%lu] (err %d)",  		       dentry->d_name.len, dentry->d_name.len,  		       dentry->d_name.name, dentry->d_inode->i_ino,  		       -ret); @@ -85,14 +85,14 @@ error:  	return ret;  bad_type_length: -	kerror("Cache object %lu type xattr length incorrect", +	pr_err("Cache object %lu type xattr length incorrect",  	       dentry->d_inode->i_ino);  	ret = -EIO;  	goto error;  bad_type:  	xtype[2] = 0; -	kerror("Cache object %*.*s [%lu] type %s not %s", +	pr_err("Cache object %*.*s [%lu] type %s not %s",  	       dentry->d_name.len, dentry->d_name.len,  	       dentry->d_name.name, dentry->d_inode->i_ino,  	       xtype, type); @@ -293,7 +293,7 @@ error:  	return ret;  bad_type_length: -	kerror("Cache object %lu xattr length incorrect", +	pr_err("Cache object %lu xattr length incorrect",  	       dentry->d_inode->i_ino);  	ret = -EIO;  	goto error;  | 
