Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull VFS fixes from Al Viro:
"Several fixes + obvious cleanup (you've missed a couple of open-coded
can_lookup() back then)"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
snd_pcm_link(): fix a leak...
use can_lookup() instead of direct checks of ->i_op->lookup
move exit_task_namespaces() outside of exit_notify()
fput: task_work_add() can fail if the caller has passed exit_task_work()
ncpfs: fix rmdir returns Device or resource busy

+15 -23
+10 -9
fs/file_table.c
··· 306 306 { 307 307 if (atomic_long_dec_and_test(&file->f_count)) { 308 308 struct task_struct *task = current; 309 + unsigned long flags; 310 + 309 311 file_sb_list_del(file); 310 - if (unlikely(in_interrupt() || task->flags & PF_KTHREAD)) { 311 - unsigned long flags; 312 - spin_lock_irqsave(&delayed_fput_lock, flags); 313 - list_add(&file->f_u.fu_list, &delayed_fput_list); 314 - schedule_work(&delayed_fput_work); 315 - spin_unlock_irqrestore(&delayed_fput_lock, flags); 316 - return; 312 + if (likely(!in_interrupt() && !(task->flags & PF_KTHREAD))) { 313 + init_task_work(&file->f_u.fu_rcuhead, ____fput); 314 + if (!task_work_add(task, &file->f_u.fu_rcuhead, true)) 315 + return; 317 316 } 318 - init_task_work(&file->f_u.fu_rcuhead, ____fput); 319 - task_work_add(task, &file->f_u.fu_rcuhead, true); 317 + spin_lock_irqsave(&delayed_fput_lock, flags); 318 + list_add(&file->f_u.fu_list, &delayed_fput_list); 319 + schedule_work(&delayed_fput_work); 320 + spin_unlock_irqrestore(&delayed_fput_lock, flags); 320 321 } 321 322 } 322 323
+2 -2
fs/namei.c
··· 1976 1976 err = complete_walk(nd); 1977 1977 1978 1978 if (!err && nd->flags & LOOKUP_DIRECTORY) { 1979 - if (!nd->inode->i_op->lookup) { 1979 + if (!can_lookup(nd->inode)) { 1980 1980 path_put(&nd->path); 1981 1981 err = -ENOTDIR; 1982 1982 } ··· 2850 2850 if ((open_flag & O_CREAT) && S_ISDIR(nd->inode->i_mode)) 2851 2851 goto out; 2852 2852 error = -ENOTDIR; 2853 - if ((nd->flags & LOOKUP_DIRECTORY) && !nd->inode->i_op->lookup) 2853 + if ((nd->flags & LOOKUP_DIRECTORY) && !can_lookup(nd->inode)) 2854 2854 goto out; 2855 2855 audit_inode(name, nd->path.dentry, 0); 2856 2856 finish_open:
-9
fs/ncpfs/dir.c
··· 1029 1029 DPRINTK("ncp_rmdir: removing %s/%s\n", 1030 1030 dentry->d_parent->d_name.name, dentry->d_name.name); 1031 1031 1032 - /* 1033 - * fail with EBUSY if there are still references to this 1034 - * directory. 1035 - */ 1036 - dentry_unhash(dentry); 1037 - error = -EBUSY; 1038 - if (!d_unhashed(dentry)) 1039 - goto out; 1040 - 1041 1032 len = sizeof(__name); 1042 1033 error = ncp_io2vol(server, __name, &len, dentry->d_name.name, 1043 1034 dentry->d_name.len, !ncp_preserve_case(dir));
+1 -1
kernel/exit.c
··· 649 649 * jobs, send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2) 650 650 */ 651 651 forget_original_parent(tsk); 652 - exit_task_namespaces(tsk); 653 652 654 653 write_lock_irq(&tasklist_lock); 655 654 if (group_dead) ··· 794 795 exit_shm(tsk); 795 796 exit_files(tsk); 796 797 exit_fs(tsk); 798 + exit_task_namespaces(tsk); 797 799 exit_task_work(tsk); 798 800 check_stack_usage(); 799 801 exit_thread();
+2 -2
sound/core/pcm_native.c
··· 1649 1649 } 1650 1650 if (!snd_pcm_stream_linked(substream)) { 1651 1651 substream->group = group; 1652 + group = NULL; 1652 1653 spin_lock_init(&substream->group->lock); 1653 1654 INIT_LIST_HEAD(&substream->group->substreams); 1654 1655 list_add_tail(&substream->link_list, &substream->group->substreams); ··· 1664 1663 _nolock: 1665 1664 snd_card_unref(substream1->pcm->card); 1666 1665 fput_light(file, fput_needed); 1667 - if (res < 0) 1668 - kfree(group); 1666 + kfree(group); 1669 1667 return res; 1670 1668 } 1671 1669