diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/efivarfs/super.c | 11 | ||||
| -rw-r--r-- | fs/exec.c | 1 | ||||
| -rw-r--r-- | fs/fat/namei_vfat.c | 20 | ||||
| -rw-r--r-- | fs/jbd2/journal.c | 5 | ||||
| -rw-r--r-- | fs/notify/inotify/inotify_user.c | 9 | ||||
| -rw-r--r-- | fs/proc/task_mmu.c | 3 |
6 files changed, 30 insertions, 19 deletions
diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c index 0a48886e069c..6dad1176ec52 100644 --- a/fs/efivarfs/super.c +++ b/fs/efivarfs/super.c | |||
| @@ -236,6 +236,7 @@ static void efivarfs_kill_sb(struct super_block *sb) | |||
| 236 | } | 236 | } |
| 237 | 237 | ||
| 238 | static struct file_system_type efivarfs_type = { | 238 | static struct file_system_type efivarfs_type = { |
| 239 | .owner = THIS_MODULE, | ||
| 239 | .name = "efivarfs", | 240 | .name = "efivarfs", |
| 240 | .mount = efivarfs_mount, | 241 | .mount = efivarfs_mount, |
| 241 | .kill_sb = efivarfs_kill_sb, | 242 | .kill_sb = efivarfs_kill_sb, |
| @@ -244,17 +245,23 @@ static struct file_system_type efivarfs_type = { | |||
| 244 | static __init int efivarfs_init(void) | 245 | static __init int efivarfs_init(void) |
| 245 | { | 246 | { |
| 246 | if (!efi_enabled(EFI_RUNTIME_SERVICES)) | 247 | if (!efi_enabled(EFI_RUNTIME_SERVICES)) |
| 247 | return 0; | 248 | return -ENODEV; |
| 248 | 249 | ||
| 249 | if (!efivars_kobject()) | 250 | if (!efivars_kobject()) |
| 250 | return 0; | 251 | return -ENODEV; |
| 251 | 252 | ||
| 252 | return register_filesystem(&efivarfs_type); | 253 | return register_filesystem(&efivarfs_type); |
| 253 | } | 254 | } |
| 254 | 255 | ||
| 256 | static __exit void efivarfs_exit(void) | ||
| 257 | { | ||
| 258 | unregister_filesystem(&efivarfs_type); | ||
| 259 | } | ||
| 260 | |||
| 255 | MODULE_AUTHOR("Matthew Garrett, Jeremy Kerr"); | 261 | MODULE_AUTHOR("Matthew Garrett, Jeremy Kerr"); |
| 256 | MODULE_DESCRIPTION("EFI Variable Filesystem"); | 262 | MODULE_DESCRIPTION("EFI Variable Filesystem"); |
| 257 | MODULE_LICENSE("GPL"); | 263 | MODULE_LICENSE("GPL"); |
| 258 | MODULE_ALIAS_FS("efivarfs"); | 264 | MODULE_ALIAS_FS("efivarfs"); |
| 259 | 265 | ||
| 260 | module_init(efivarfs_init); | 266 | module_init(efivarfs_init); |
| 267 | module_exit(efivarfs_exit); | ||
| @@ -277,6 +277,7 @@ static int __bprm_mm_init(struct linux_binprm *bprm) | |||
| 277 | goto err; | 277 | goto err; |
| 278 | 278 | ||
| 279 | mm->stack_vm = mm->total_vm = 1; | 279 | mm->stack_vm = mm->total_vm = 1; |
| 280 | arch_bprm_mm_init(mm, vma); | ||
| 280 | up_write(&mm->mmap_sem); | 281 | up_write(&mm->mmap_sem); |
| 281 | bprm->p = vma->vm_end - sizeof(void *); | 282 | bprm->p = vma->vm_end - sizeof(void *); |
| 282 | return 0; | 283 | return 0; |
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c index 6df8d3d885e5..b8b92c2f9683 100644 --- a/fs/fat/namei_vfat.c +++ b/fs/fat/namei_vfat.c | |||
| @@ -736,7 +736,12 @@ static struct dentry *vfat_lookup(struct inode *dir, struct dentry *dentry, | |||
| 736 | } | 736 | } |
| 737 | 737 | ||
| 738 | alias = d_find_alias(inode); | 738 | alias = d_find_alias(inode); |
| 739 | if (alias && !vfat_d_anon_disconn(alias)) { | 739 | /* |
| 740 | * Checking "alias->d_parent == dentry->d_parent" to make sure | ||
| 741 | * FS is not corrupted (especially double linked dir). | ||
| 742 | */ | ||
| 743 | if (alias && alias->d_parent == dentry->d_parent && | ||
| 744 | !vfat_d_anon_disconn(alias)) { | ||
| 740 | /* | 745 | /* |
| 741 | * This inode has non anonymous-DCACHE_DISCONNECTED | 746 | * This inode has non anonymous-DCACHE_DISCONNECTED |
| 742 | * dentry. This means, the user did ->lookup() by an | 747 | * dentry. This means, the user did ->lookup() by an |
| @@ -755,12 +760,9 @@ static struct dentry *vfat_lookup(struct inode *dir, struct dentry *dentry, | |||
| 755 | 760 | ||
| 756 | out: | 761 | out: |
| 757 | mutex_unlock(&MSDOS_SB(sb)->s_lock); | 762 | mutex_unlock(&MSDOS_SB(sb)->s_lock); |
| 758 | dentry->d_time = dentry->d_parent->d_inode->i_version; | 763 | if (!inode) |
| 759 | dentry = d_splice_alias(inode, dentry); | 764 | dentry->d_time = dir->i_version; |
| 760 | if (dentry) | 765 | return d_splice_alias(inode, dentry); |
| 761 | dentry->d_time = dentry->d_parent->d_inode->i_version; | ||
| 762 | return dentry; | ||
| 763 | |||
| 764 | error: | 766 | error: |
| 765 | mutex_unlock(&MSDOS_SB(sb)->s_lock); | 767 | mutex_unlock(&MSDOS_SB(sb)->s_lock); |
| 766 | return ERR_PTR(err); | 768 | return ERR_PTR(err); |
| @@ -793,7 +795,6 @@ static int vfat_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |||
| 793 | inode->i_mtime = inode->i_atime = inode->i_ctime = ts; | 795 | inode->i_mtime = inode->i_atime = inode->i_ctime = ts; |
| 794 | /* timestamp is already written, so mark_inode_dirty() is unneeded. */ | 796 | /* timestamp is already written, so mark_inode_dirty() is unneeded. */ |
| 795 | 797 | ||
| 796 | dentry->d_time = dentry->d_parent->d_inode->i_version; | ||
| 797 | d_instantiate(dentry, inode); | 798 | d_instantiate(dentry, inode); |
| 798 | out: | 799 | out: |
| 799 | mutex_unlock(&MSDOS_SB(sb)->s_lock); | 800 | mutex_unlock(&MSDOS_SB(sb)->s_lock); |
| @@ -824,6 +825,7 @@ static int vfat_rmdir(struct inode *dir, struct dentry *dentry) | |||
| 824 | clear_nlink(inode); | 825 | clear_nlink(inode); |
| 825 | inode->i_mtime = inode->i_atime = CURRENT_TIME_SEC; | 826 | inode->i_mtime = inode->i_atime = CURRENT_TIME_SEC; |
| 826 | fat_detach(inode); | 827 | fat_detach(inode); |
| 828 | dentry->d_time = dir->i_version; | ||
| 827 | out: | 829 | out: |
| 828 | mutex_unlock(&MSDOS_SB(sb)->s_lock); | 830 | mutex_unlock(&MSDOS_SB(sb)->s_lock); |
| 829 | 831 | ||
| @@ -849,6 +851,7 @@ static int vfat_unlink(struct inode *dir, struct dentry *dentry) | |||
| 849 | clear_nlink(inode); | 851 | clear_nlink(inode); |
| 850 | inode->i_mtime = inode->i_atime = CURRENT_TIME_SEC; | 852 | inode->i_mtime = inode->i_atime = CURRENT_TIME_SEC; |
| 851 | fat_detach(inode); | 853 | fat_detach(inode); |
| 854 | dentry->d_time = dir->i_version; | ||
| 852 | out: | 855 | out: |
| 853 | mutex_unlock(&MSDOS_SB(sb)->s_lock); | 856 | mutex_unlock(&MSDOS_SB(sb)->s_lock); |
| 854 | 857 | ||
| @@ -889,7 +892,6 @@ static int vfat_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) | |||
| 889 | inode->i_mtime = inode->i_atime = inode->i_ctime = ts; | 892 | inode->i_mtime = inode->i_atime = inode->i_ctime = ts; |
| 890 | /* timestamp is already written, so mark_inode_dirty() is unneeded. */ | 893 | /* timestamp is already written, so mark_inode_dirty() is unneeded. */ |
| 891 | 894 | ||
| 892 | dentry->d_time = dentry->d_parent->d_inode->i_version; | ||
| 893 | d_instantiate(dentry, inode); | 895 | d_instantiate(dentry, inode); |
| 894 | 896 | ||
| 895 | mutex_unlock(&MSDOS_SB(sb)->s_lock); | 897 | mutex_unlock(&MSDOS_SB(sb)->s_lock); |
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index e4dc74713a43..1df94fabe4eb 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c | |||
| @@ -1853,13 +1853,12 @@ int jbd2_journal_set_features (journal_t *journal, unsigned long compat, | |||
| 1853 | journal->j_chksum_driver = NULL; | 1853 | journal->j_chksum_driver = NULL; |
| 1854 | return 0; | 1854 | return 0; |
| 1855 | } | 1855 | } |
| 1856 | } | ||
| 1857 | 1856 | ||
| 1858 | /* Precompute checksum seed for all metadata */ | 1857 | /* Precompute checksum seed for all metadata */ |
| 1859 | if (jbd2_journal_has_csum_v2or3(journal)) | ||
| 1860 | journal->j_csum_seed = jbd2_chksum(journal, ~0, | 1858 | journal->j_csum_seed = jbd2_chksum(journal, ~0, |
| 1861 | sb->s_uuid, | 1859 | sb->s_uuid, |
| 1862 | sizeof(sb->s_uuid)); | 1860 | sizeof(sb->s_uuid)); |
| 1861 | } | ||
| 1863 | } | 1862 | } |
| 1864 | 1863 | ||
| 1865 | /* If enabling v1 checksums, downgrade superblock */ | 1864 | /* If enabling v1 checksums, downgrade superblock */ |
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index daf76652fe58..283aa312d745 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
| @@ -227,14 +227,13 @@ static ssize_t inotify_read(struct file *file, char __user *buf, | |||
| 227 | struct fsnotify_event *kevent; | 227 | struct fsnotify_event *kevent; |
| 228 | char __user *start; | 228 | char __user *start; |
| 229 | int ret; | 229 | int ret; |
| 230 | DEFINE_WAIT(wait); | 230 | DEFINE_WAIT_FUNC(wait, woken_wake_function); |
| 231 | 231 | ||
| 232 | start = buf; | 232 | start = buf; |
| 233 | group = file->private_data; | 233 | group = file->private_data; |
| 234 | 234 | ||
| 235 | add_wait_queue(&group->notification_waitq, &wait); | ||
| 235 | while (1) { | 236 | while (1) { |
| 236 | prepare_to_wait(&group->notification_waitq, &wait, TASK_INTERRUPTIBLE); | ||
| 237 | |||
| 238 | mutex_lock(&group->notification_mutex); | 237 | mutex_lock(&group->notification_mutex); |
| 239 | kevent = get_one_event(group, count); | 238 | kevent = get_one_event(group, count); |
| 240 | mutex_unlock(&group->notification_mutex); | 239 | mutex_unlock(&group->notification_mutex); |
| @@ -264,10 +263,10 @@ static ssize_t inotify_read(struct file *file, char __user *buf, | |||
| 264 | if (start != buf) | 263 | if (start != buf) |
| 265 | break; | 264 | break; |
| 266 | 265 | ||
| 267 | schedule(); | 266 | wait_woken(&wait, TASK_INTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT); |
| 268 | } | 267 | } |
| 268 | remove_wait_queue(&group->notification_waitq, &wait); | ||
| 269 | 269 | ||
| 270 | finish_wait(&group->notification_waitq, &wait); | ||
| 271 | if (start != buf && ret != -EFAULT) | 270 | if (start != buf && ret != -EFAULT) |
| 272 | ret = buf - start; | 271 | ret = buf - start; |
| 273 | return ret; | 272 | return ret; |
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 4e0388cffe3d..f6734c6b66a6 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
| @@ -552,6 +552,9 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma) | |||
| 552 | [ilog2(VM_GROWSDOWN)] = "gd", | 552 | [ilog2(VM_GROWSDOWN)] = "gd", |
| 553 | [ilog2(VM_PFNMAP)] = "pf", | 553 | [ilog2(VM_PFNMAP)] = "pf", |
| 554 | [ilog2(VM_DENYWRITE)] = "dw", | 554 | [ilog2(VM_DENYWRITE)] = "dw", |
| 555 | #ifdef CONFIG_X86_INTEL_MPX | ||
| 556 | [ilog2(VM_MPX)] = "mp", | ||
| 557 | #endif | ||
| 555 | [ilog2(VM_LOCKED)] = "lo", | 558 | [ilog2(VM_LOCKED)] = "lo", |
| 556 | [ilog2(VM_IO)] = "io", | 559 | [ilog2(VM_IO)] = "io", |
| 557 | [ilog2(VM_SEQ_READ)] = "sr", | 560 | [ilog2(VM_SEQ_READ)] = "sr", |
