]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
proc: fix return value of proc_reg_open() in "too late" case
authorAlexey Dobriyan <adobriyan@gmail.com>
Thu, 2 Oct 2008 20:18:52 +0000 (00:18 +0400)
committerAlexey Dobriyan <adobriyan@gmail.com>
Fri, 10 Oct 2008 00:18:54 +0000 (04:18 +0400)
commit300b994b74e75120dd1a48529552a44977e0a82a
tree5a8cb645c5a10182bbd0bb456285d362bcdd6f51
parent3fa8749e584b55f1180411ab1b51117190bac1e5
proc: fix return value of proc_reg_open() in "too late" case

If ->open() wasn't called, returning 0 is misleading and, theoretically,
oopsable:
1) remove_proc_entry clears ->proc_fops, drops lock,
2) ->open "succeeds",
3) ->release oopses, because it assumes ->open was called (single_release()).

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
fs/proc/inode.c