diff options
Diffstat (limited to 'fs/ecryptfs')
-rw-r--r-- | fs/ecryptfs/main.c | 15 | ||||
-rw-r--r-- | fs/ecryptfs/mmap.c | 11 |
2 files changed, 8 insertions, 18 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index fc4a3a22464..8cbf3f69ebe 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c @@ -583,8 +583,7 @@ inode_info_init_once(void *vptr, struct kmem_cache *cachep, unsigned long flags) { struct ecryptfs_inode_info *ei = (struct ecryptfs_inode_info *)vptr; - if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) == - SLAB_CTOR_CONSTRUCTOR) + if (flags & SLAB_CTOR_CONSTRUCTOR) inode_init_once(&ei->vfs_inode); } @@ -793,7 +792,7 @@ static int do_sysfs_registration(void) "Unable to register ecryptfs sysfs subsystem\n"); goto out; } - rc = sysfs_create_file(&ecryptfs_subsys.kset.kobj, + rc = sysfs_create_file(&ecryptfs_subsys.kobj, &sysfs_attr_version.attr); if (rc) { printk(KERN_ERR @@ -801,12 +800,12 @@ static int do_sysfs_registration(void) subsystem_unregister(&ecryptfs_subsys); goto out; } - rc = sysfs_create_file(&ecryptfs_subsys.kset.kobj, + rc = sysfs_create_file(&ecryptfs_subsys.kobj, &sysfs_attr_version_str.attr); if (rc) { printk(KERN_ERR "Unable to create ecryptfs version_str attribute\n"); - sysfs_remove_file(&ecryptfs_subsys.kset.kobj, + sysfs_remove_file(&ecryptfs_subsys.kobj, &sysfs_attr_version.attr); subsystem_unregister(&ecryptfs_subsys); goto out; @@ -841,7 +840,7 @@ static int __init ecryptfs_init(void) ecryptfs_free_kmem_caches(); goto out; } - kset_set_kset_s(&ecryptfs_subsys, fs_subsys); + kobj_set_kset_s(&ecryptfs_subsys, fs_subsys); sysfs_attr_version.attr.owner = THIS_MODULE; sysfs_attr_version_str.attr.owner = THIS_MODULE; rc = do_sysfs_registration(); @@ -862,9 +861,9 @@ out: static void __exit ecryptfs_exit(void) { - sysfs_remove_file(&ecryptfs_subsys.kset.kobj, + sysfs_remove_file(&ecryptfs_subsys.kobj, &sysfs_attr_version.attr); - sysfs_remove_file(&ecryptfs_subsys.kset.kobj, + sysfs_remove_file(&ecryptfs_subsys.kobj, &sysfs_attr_version_str.attr); subsystem_unregister(&ecryptfs_subsys); ecryptfs_release_messaging(ecryptfs_transport); diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c index b731b09499c..0770c4b66f5 100644 --- a/fs/ecryptfs/mmap.c +++ b/fs/ecryptfs/mmap.c @@ -46,7 +46,6 @@ struct kmem_cache *ecryptfs_lower_page_cache; */ static struct page *ecryptfs_get1page(struct file *file, int index) { - struct page *page; struct dentry *dentry; struct inode *inode; struct address_space *mapping; @@ -54,14 +53,7 @@ static struct page *ecryptfs_get1page(struct file *file, int index) dentry = file->f_path.dentry; inode = dentry->d_inode; mapping = inode->i_mapping; - page = read_cache_page(mapping, index, - (filler_t *)mapping->a_ops->readpage, - (void *)file); - if (IS_ERR(page)) - goto out; - wait_on_page_locked(page); -out: - return page; + return read_mapping_page(mapping, index, (void *)file); } static @@ -233,7 +225,6 @@ int ecryptfs_do_readpage(struct file *file, struct page *page, ecryptfs_printk(KERN_ERR, "Error reading from page cache\n"); goto out; } - wait_on_page_locked(lower_page); page_data = kmap_atomic(page, KM_USER0); lower_page_data = kmap_atomic(lower_page, KM_USER1); memcpy(page_data, lower_page_data, PAGE_CACHE_SIZE); |