]> git.neil.brown.name Git - history.git/commitdiff
Import 2.3.9pre3 2.3.9pre3
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:25:47 +0000 (15:25 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:25:47 +0000 (15:25 -0500)
28 files changed:
Documentation/Configure.help
arch/alpha/config.in
arch/alpha/kernel/osf_sys.c
arch/arm/kernel/sys_arm.c
arch/i386/config.in
arch/mips/config.in
arch/mips/kernel/syscall.c
arch/mips/kernel/sysirix.c
arch/ppc/config.in
arch/ppc/defconfig
arch/ppc/kernel/syscalls.c
arch/sparc/config.in
arch/sparc/defconfig
arch/sparc64/config.in
arch/sparc64/defconfig
arch/sparc64/solaris/misc.c
fs/Makefile
fs/binfmt_aout.c
fs/binfmt_java.c [deleted file]
fs/buffer.c
fs/exec.c
fs/ext2/file.c
fs/ext2/inode.c
fs/ext2/truncate.c
fs/select.c
include/linux/binfmts.h
include/linux/sysctl.h
kernel/sysctl.c

index 2caf07806ea6664a338e59375f76c12cdebed6aa..135d4b373570c16d9cac63d95c82d3919d81d113 100644 (file)
@@ -1705,44 +1705,6 @@ CONFIG_BINFMT_AOUT
   because some crucial programs on your system might still be in A.OUT
   format.
 
-Kernel support for JAVA binaries (obsolete)
-CONFIG_BINFMT_JAVA
-  JAVA(tm) is an object oriented programming language developed by
-  SUN; JAVA programs are compiled into "JAVA bytecode" binaries which
-  can then be interpreted by run time systems on many different
-  architectures and operating systems. These JAVA binaries are
-  becoming a universal executable format.
-
-  If you want to execute JAVA binaries, read the Java on Linux HOWTO,
-  available via FTP (user: anonymous) at
-  ftp://metalab.unc.edu/pub/Linux/docs/HOWTO. You will then need to
-  install the run time system contained in the Java Developers Kit
-  (JDK) as described in the HOWTO. This is completely independent of
-  the Linux kernel and you do NOT need to say Y here for this to work.
-
-  Saying Y here allows you to execute a JAVA bytecode binary just like
-  any other Linux program: by simply typing in its name. (You also
-  need to have the JDK installed for this to work). As more and more
-  Java programs become available, the use for this will gradually
-  increase. You can even execute HTML files containing JAVA applets
-  (little embedded JAVA binaries) if those files start with the string
-  "<!--applet-->". If you want to use this, say Y here and read
-  Documentation/java.txt.
-
-  If you disable this option it will reduce your kernel by about 4 KB.
-  This is not much and by itself does not warrant removing support.
-  However its removal is a good idea if you do not have the JDK
-  installed. You may answer M for module support and later load the
-  module when you install the JDK or find an interesting Java program
-  that you can't live without. The module will be called
-  binfmt_java.o.
-
-  The complete functionality of this Java support is also provided by
-  the more general option "Kernel support for MISC binaries",
-  below. This option is therefore considered obsolete and you should
-  say N here and Y to "Kernel support for MISC binaries" if you're 
-  interested in transparently executing Java programs.
-
 Kernel support for Linux/Intel ELF binaries
 CONFIG_BINFMT_EM86
   Say Y here if you want to be able to execute Linux/Intel ELF
index 4a0da0cbcb3044d30a2005a9e34921a05c1f6737..75b3e9563e7ef72248a1a407dc9c5449918b83d1 100644 (file)
@@ -187,9 +187,6 @@ bool 'Sysctl support' CONFIG_SYSCTL
 tristate 'Kernel support for a.out (ECOFF) binaries' CONFIG_BINFMT_AOUT
 tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-  tristate 'Kernel support for JAVA binaries (obsolete)' CONFIG_BINFMT_JAVA
-fi
 tristate 'Kernel support for Linux/Intel ELF binaries' CONFIG_BINFMT_EM86
 tristate 'Parallel port support' CONFIG_PARPORT
 if [ "$CONFIG_PARPORT" != "n" ]; then
index 38bd43947c081afd3c7c3e703ff04954cbffab2f..9ff616afa3b178bd10a194eb4e9d0b2b72b29733 100644 (file)
@@ -255,6 +255,7 @@ asmlinkage unsigned long osf_mmap(unsigned long addr, unsigned long len,
        struct file *file = NULL;
        unsigned long ret = -EBADF;
 
+       down(&current->mm->mmap_sem);
        lock_kernel();
 #if 0
        if (flags & (_MAP_HASSEMAPHORE | _MAP_INHERIT | _MAP_UNALIGNED))
@@ -272,6 +273,7 @@ asmlinkage unsigned long osf_mmap(unsigned long addr, unsigned long len,
                fput(file);
 out:
        unlock_kernel();
+       up(&current->mm->mmap_sem);
        return ret;
 }
 
index 9da64aad0d1ff80f2efd30c143023147813eb918..94f158b3e7b3c4054874193404a41a5f518957ab 100644 (file)
@@ -72,6 +72,7 @@ asmlinkage int old_mmap(struct mmap_arg_struct *arg)
        struct file * file = NULL;
        struct mmap_arg_struct a;
 
+       down(&current->mm->mmap_sem);
        lock_kernel();
        if (copy_from_user(&a, arg, sizeof(a)))
                goto out;
@@ -87,6 +88,7 @@ asmlinkage int old_mmap(struct mmap_arg_struct *arg)
                fput(file);
 out:
        unlock_kernel();
+       up(&current->mm->mmap_sem);
        return error;
 }
 
index 789b19b3c0c655699f105b9827c456c6e414d92d..f0ac5e2c03e89ed8175a8ac3e0b39d566a0c210c 100644 (file)
@@ -91,9 +91,6 @@ bool 'Sysctl support' CONFIG_SYSCTL
 tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
 tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-  tristate 'Kernel support for JAVA binaries (obsolete)' CONFIG_BINFMT_JAVA
-fi
 
 tristate 'Parallel port support' CONFIG_PARPORT
 if [ "$CONFIG_PARPORT" != "n" ]; then
index 6ec172d725d9915f1ee42680b923504c7fb41ad3..d2ad0f4927ece69cc0ac843e43a6e8aec78c6345 100644 (file)
@@ -76,10 +76,6 @@ fi
 define_bool CONFIG_BINFMT_AOUT n
 define_bool CONFIG_BINFMT_ELF y
 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-  tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-  tristate 'Kernel support for JAVA binaries (obsolete)' CONFIG_BINFMT_JAVA
-fi
 
 bool 'Networking support' CONFIG_NET
 bool 'System V IPC' CONFIG_SYSVIPC
index 11415b79f4408842b73ed37020ccbd73ec094889..bf84e76dbc8ee754f7468cf47cb7c11e93884a3b 100644 (file)
@@ -61,6 +61,7 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len, int prot,
        struct file * file = NULL;
        unsigned long error = -EFAULT;
 
+       down(&current->mm->mmap_sem);
        lock_kernel();
        if (!(flags & MAP_ANONYMOUS)) {
                error = -EBADF;
@@ -74,6 +75,7 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len, int prot,
                 fput(file);
 out:
        unlock_kernel();
+       up(&current->mm->mmap_sem);
        return error;
 }
 
index 4110648634d3330842c852f15dc1eee0ca5bd50a..321ee302640994cd5cc04bc82b165bd617ecd261 100644 (file)
@@ -1103,6 +1103,7 @@ asmlinkage unsigned long irix_mmap32(unsigned long addr, size_t len, int prot,
        struct file *file = NULL;
        unsigned long retval;
 
+       down(&current->mm->mmap_sem);
        lock_kernel();
        if(!(flags & MAP_ANONYMOUS)) {
                if(!(file = fget(fd))) {
@@ -1130,6 +1131,7 @@ asmlinkage unsigned long irix_mmap32(unsigned long addr, size_t len, int prot,
 
 out:
        unlock_kernel();
+       up(&current->mm->mmap_sem);
        return retval;
 }
 
index 565b39fd1df7a26a41585f04cd8b1aa5ce89172f..a3c166a8a89845122ffd64e25a7b7a334c985daf 100644 (file)
@@ -65,7 +65,6 @@ bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
 define_bool CONFIG_BINFMT_ELF y
 define_bool CONFIG_KERNEL_ELF y
 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-tristate 'Kernel support for JAVA binaries (obsolete)' CONFIG_BINFMT_JAVA
 
 tristate 'Parallel port support' CONFIG_PARPORT
 if [ "$CONFIG_PARPORT" != "n" ]; then
index d746c7e64162b5e596ddc67104bc8c91068343b8..6761d8602f618520b2e10b72d3fac64c0f5a4a30 100644 (file)
@@ -35,7 +35,6 @@ CONFIG_SYSVIPC=y
 CONFIG_BINFMT_ELF=y
 CONFIG_KERNEL_ELF=y
 # CONFIG_BINFMT_MISC is not set
-# CONFIG_BINFMT_JAVA is not set
 # CONFIG_PARPORT is not set
 CONFIG_VGA_CONSOLE=y
 CONFIG_FB=y
index 3aa0becef6fba1891e4c6a4655fc8451c3ec0253..5ae2957574f82edee4ad72b4c9aedf96b9316d2d 100644 (file)
@@ -201,12 +201,16 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len,
 
        lock_kernel();
        if (!(flags & MAP_ANONYMOUS)) {
-               if (fd >= NR_OPEN || !(file = current->files->fd[fd]))
+               if (!(file = fget(fd)))
                        goto out;
        }
        
        flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+       down(&current->mm->mmap_sem);
        ret = do_mmap(file, addr, len, prot, flags, offset);
+       up(&current->mm->mmap_sem);
+       if (file)
+               fput(file);
 out:
        unlock_kernel();
        return ret;
index 1fc89b977346506ab6421e8b4935702daec4f6e0..1f485d4ca4628dbdf86b44556fddf82edeb8c6f4 100644 (file)
@@ -72,9 +72,6 @@ bool 'Sysctl support' CONFIG_SYSCTL
 tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
 tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-  tristate 'Kernel support for JAVA binaries (obsolete)' CONFIG_BINFMT_JAVA
-fi
 endmenu
 
 mainmenu_option next_comment
index 1caf1143a71f7e5cbe4fa2744a11964a1bc0a997..07985d46d7c0ac6a7912d78d36c758e968e2790f 100644 (file)
@@ -80,7 +80,6 @@ CONFIG_SYSCTL=y
 CONFIG_BINFMT_AOUT=y
 CONFIG_BINFMT_ELF=y
 CONFIG_BINFMT_MISC=m
-CONFIG_BINFMT_JAVA=m
 
 #
 # Floppy, IDE, and other block devices
index 58ac245004853a9c814f5de580d6f8c8386230a2..4b840ee9ab634768923d784182188f6bd5b6b172 100644 (file)
@@ -62,10 +62,7 @@ if [ "$CONFIG_SPARC32_COMPAT" != "n" ]; then
   tristate 'Kernel support for 32-bit ELF binaries' CONFIG_BINFMT_ELF32
   bool 'Kernel support for 32-bit (ie. SunOS) a.out binaries' CONFIG_BINFMT_AOUT32
 fi
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-  tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-  tristate 'Kernel support for JAVA binaries (obsolete)' CONFIG_BINFMT_JAVA
-fi
+tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
 if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
   tristate 'Solaris binary emulation' CONFIG_SOLARIS_EMUL
 fi
index 86eb0581980702175ca5adf6eb1c49716c76fe8f..f55370272978ef2ef886b56fd51b953189fe1d70 100644 (file)
@@ -91,7 +91,6 @@ CONFIG_BINFMT_ELF=y
 CONFIG_BINFMT_ELF32=y
 # CONFIG_BINFMT_AOUT32 is not set
 CONFIG_BINFMT_MISC=m
-CONFIG_BINFMT_JAVA=m
 CONFIG_SOLARIS_EMUL=m
 CONFIG_PARPORT=m
 CONFIG_PARPORT_AX=m
index c29b79f6857ce2c8b4b7ed32f11c96390afc1a34..4b3a1ce5d3136e0716e2c4785e92d413ca88bad0 100644 (file)
@@ -83,6 +83,7 @@ static u32 do_solaris_mmap(u32 addr, u32 len, u32 prot, u32 flags, u32 fd, u64 o
                }
        }
 
+       down(&current->mm->mmap_sem);
        retval = -ENOMEM;
        if(!(flags & MAP_FIXED) && !addr) {
                unsigned long attempt = get_unmapped_area(addr, len);
@@ -102,6 +103,7 @@ static u32 do_solaris_mmap(u32 addr, u32 len, u32 prot, u32 flags, u32 fd, u64 o
        if(!ret_type)
                retval = ((retval < 0xf0000000) ? 0 : retval);
 out_putf:
+       up(&current->mm->mmap_sem);
        if (file)
                fput(file);
 out:
index b94509a03217cd57bb89cca326eccc8e609cd67a..069b1a2a41e38521fdc4031a8c0d924320ee5925 100644 (file)
@@ -263,14 +263,6 @@ else
   endif
 endif
 
-ifeq ($(CONFIG_BINFMT_JAVA),y)
-BINFMTS += binfmt_java.o
-else
-  ifeq ($(CONFIG_BINFMT_JAVA),m)
-  M_OBJS += binfmt_java.o
-  endif
-endif
-
 ifeq ($(CONFIG_BINFMT_EM86),y)
 BINFMTS += binfmt_em86.o
 else
index 2b886a147ead099df933b541aeecd53d2c6552b3..2baf75c4b0a97f8bedaa17682df26ca274b96f12 100644 (file)
@@ -396,7 +396,7 @@ static inline int do_load_aout_binary(struct linux_binprm * bprm, struct pt_regs
                fd = open_dentry(bprm->dentry, O_RDONLY);
                if (fd < 0)
                        return fd;
-               file = fcheck(fd);
+               file = fget(fd);
 
                if ((fd_offset & ~PAGE_MASK) != 0) {
                        printk(KERN_WARNING 
@@ -406,6 +406,7 @@ static inline int do_load_aout_binary(struct linux_binprm * bprm, struct pt_regs
                }
 
                if (!file->f_op || !file->f_op->mmap || ((fd_offset & ~PAGE_MASK) != 0)) {
+                       fput(file);
                        sys_close(fd);
                        do_brk(0, ex.a_text+ex.a_data);
                        read_exec(bprm->dentry, fd_offset,
@@ -422,6 +423,7 @@ static inline int do_load_aout_binary(struct linux_binprm * bprm, struct pt_regs
                        fd_offset);
 
                if (error != N_TXTADDR(ex)) {
+                       fput(file);
                        sys_close(fd);
                        send_sig(SIGKILL, current, 0);
                        return error;
@@ -431,6 +433,7 @@ static inline int do_load_aout_binary(struct linux_binprm * bprm, struct pt_regs
                                PROT_READ | PROT_WRITE | PROT_EXEC,
                                MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE,
                                fd_offset + ex.a_text);
+               fput(file);
                sys_close(fd);
                if (error != N_DATADDR(ex)) {
                        send_sig(SIGKILL, current, 0);
diff --git a/fs/binfmt_java.c b/fs/binfmt_java.c
deleted file mode 100644 (file)
index 2bd036d..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- *  linux/fs/binfmt_java.c
- *
- *  Copyright (C) 1996  Brian A. Lantz
- *  derived from binfmt_script.c
- *
- *  Simplified and modified to support binary java interpreters
- *  by Tom May <ftom@netcom.com>.
- */
-
-#include <linux/module.h>
-#include <linux/string.h>
-#include <linux/stat.h>
-#include <linux/malloc.h>
-#include <linux/binfmts.h>
-#include <linux/init.h>
-
-#define _PATH_JAVA     "/usr/bin/java"
-#define _PATH_APPLET   "/usr/bin/appletviewer"
-
-/*  These paths can be modified with sysctl().  */
-
-char binfmt_java_interpreter[65] = _PATH_JAVA;
-char binfmt_java_appletviewer[65] = _PATH_APPLET;
-
-static int do_load_java(struct linux_binprm *bprm,struct pt_regs *regs)
-{
-       char *i_name;
-       int len;
-       int retval;
-       struct dentry * dentry;
-       unsigned char *ucp = (unsigned char *) bprm->buf;
-
-       if ((ucp[0] != 0xca) || (ucp[1] != 0xfe) || (ucp[2] != 0xba) || (ucp[3] != 0xbe)) 
-               return -ENOEXEC;
-
-       /*
-        * Fail if we're called recursively, e.g., the Java interpreter
-        * is a java binary.
-        */
-
-       if (bprm->java)
-               return -ENOEXEC;
-
-       bprm->java = 1;
-
-       dput(bprm->dentry);
-       bprm->dentry = NULL;
-
-       /*
-        * Set args: [0] the name of the java interpreter
-        *           [1] name of java class to execute, which is the
-        *               filename without the path and without trailing
-        *               ".class".  Note that the interpreter will use
-        *               its own way to found the class file (typically using
-        *               environment variable CLASSPATH), and may in fact
-        *               execute a different file from the one we want.
-        *
-        * This is done in reverse order, because of how the
-        * user environment and arguments are stored.
-        */
-       remove_arg_zero(bprm);
-       len = strlen (bprm->filename);
-       if (len >= 6 && !strcmp (bprm->filename + len - 6, ".class"))
-               bprm->filename[len - 6] = 0;
-       if ((i_name = strrchr (bprm->filename, '/')) != NULL)
-               i_name++;
-       else
-               i_name = bprm->filename;
-
-       retval = copy_strings_kernel(1, &i_name, bprm); 
-       if (retval < 0) 
-               return retval; 
-       bprm->argc++;
-
-       i_name = binfmt_java_interpreter;
-       retval = copy_strings_kernel(1, &i_name, bprm); 
-       if (retval < 0) 
-               return retval; 
-       bprm->argc++;
-
-       /*
-        * OK, now restart the process with the interpreter's dentry.
-        */
-       bprm->filename = binfmt_java_interpreter;
-       dentry = open_namei(binfmt_java_interpreter, 0, 0);
-       retval = PTR_ERR(dentry);
-       if (IS_ERR(dentry))
-               return retval;
-
-       bprm->dentry = dentry;
-       retval = prepare_binprm(bprm);
-       if (retval < 0)
-               return retval;
-
-       return search_binary_handler(bprm,regs);
-}
-
-static int do_load_applet(struct linux_binprm *bprm,struct pt_regs *regs)
-{
-       char *i_name;
-       struct dentry * dentry;
-       int retval;
-
-       if (strncmp (bprm->buf, "<!--applet", 10))
-               return -ENOEXEC;
-
-       dput(bprm->dentry);
-       bprm->dentry = NULL;
-
-       /*
-        * Set args: [0] the name of the appletviewer
-        *           [1] filename of html file
-        *
-        * This is done in reverse order, because of how the
-        * user environment and arguments are stored.
-        */
-       remove_arg_zero(bprm);
-       i_name = bprm->filename;
-       retval = copy_strings_kernel(1, &i_name, bprm);
-       if (retval < 0) return retval; 
-       bprm->argc++;
-
-       i_name = binfmt_java_appletviewer;
-       retval = copy_strings_kernel(1, &i_name, bprm);
-       if (retval < 0) return retval; 
-       bprm->argc++;
-
-       /*
-        * OK, now restart the process with the interpreter's dentry.
-        */
-       bprm->filename = binfmt_java_appletviewer;
-       dentry = open_namei(binfmt_java_appletviewer, 0, 0);
-       retval = PTR_ERR(dentry);
-       if (IS_ERR(dentry))
-               return retval;
-
-       bprm->dentry = dentry;
-       retval = prepare_binprm(bprm);
-       if (retval < 0)
-               return retval;
-
-       return search_binary_handler(bprm,regs);
-}
-
-static int load_java(struct linux_binprm *bprm,struct pt_regs *regs)
-{
-       int retval;
-       MOD_INC_USE_COUNT;
-       retval = do_load_java(bprm,regs);
-       MOD_DEC_USE_COUNT;
-       return retval;
-}
-
-static struct linux_binfmt java_format = {
-#ifndef MODULE
-       NULL, 0, load_java, NULL, NULL
-#else
-       NULL, &__this_module, load_java, NULL, NULL
-#endif
-};
-
-static int load_applet(struct linux_binprm *bprm,struct pt_regs *regs)
-{
-       int retval;
-       MOD_INC_USE_COUNT;
-       retval = do_load_applet(bprm,regs);
-       MOD_DEC_USE_COUNT;
-       return retval;
-}
-
-static struct linux_binfmt applet_format = {
-#ifndef MODULE
-       NULL, 0, load_applet, NULL, NULL
-#else
-       NULL, &__this_module, load_applet, NULL, NULL
-#endif
-};
-
-int __init init_java_binfmt(void)
-{
-       register_binfmt(&java_format);
-       return register_binfmt(&applet_format);
-}
-
-#ifdef MODULE
-int init_module(void)
-{
-       return init_java_binfmt();
-}
-
-void cleanup_module( void) {
-       unregister_binfmt(&java_format);
-       unregister_binfmt(&applet_format);
-}
-#endif
index 20c84dd7fbe7023b43849f12fb9942d8e9f64ac7..5823ddeb034fbd4c478d3e03f79baf0e7aedf7b9 100644 (file)
@@ -1246,7 +1246,6 @@ static int create_page_buffers(int rw, struct page *page, kdev_t dev, int b[], i
                 * two cases.
                 */
                if (bmap && !block) {
-                       set_bit(BH_Uptodate, &bh->b_state);
                        memset(bh->b_data, 0, size);
                }
        }
@@ -1691,10 +1690,13 @@ int block_read_full_page(struct file * file, struct page * page)
                                nr++;
                        } else {
                                /*
-                                * filesystem 'hole' represents zero-contents:
+                                * filesystem 'hole' represents zero-contents.
+                                *
+                                * Don't mark the buffer up-to-date (that also implies
+                                * that it is ok on disk, which it isn't), but _do_
+                                * zero out the contents so that readers see the zeroes.
                                 */
                                memset(bh->b_data, 0, blocksize);
-                               set_bit(BH_Uptodate, &bh->b_state);
                        }
                }
                iblock++;
index e5b55e247c390ead1b75f0c162b1c5cabd29f7b7..c6eb8ff69c4b609b3e94eb858bef9078d0c7be28 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -72,10 +72,6 @@ void __init binfmt_setup(void)
        init_aout32_binfmt();
 #endif
 
-#ifdef CONFIG_BINFMT_JAVA
-       init_java_binfmt();
-#endif
-
 #ifdef CONFIG_BINFMT_EM86
        init_em86_binfmt();
 #endif
@@ -804,7 +800,6 @@ int do_execve(char * filename, char ** argv, char ** envp, struct pt_regs * regs
        bprm.dentry = dentry;
        bprm.filename = filename;
        bprm.sh_bang = 0;
-       bprm.java = 0;
        bprm.loader = 0;
        bprm.exec = 0;
        if ((bprm.argc = count(argv)) < 0) {
index 62ee1ea5319a858a2aa4b3cdd065f0330fd459f5..02a3c1d97a2718ccb6fe26f32be3b9066899c16c 100644 (file)
@@ -113,8 +113,11 @@ static int ext2_get_block(struct inode *inode, unsigned long block, struct buffe
                unsigned long blocknr;
 
                blocknr = ext2_getblk_block(inode, block, 1, &error, &created);
-               if (!blocknr)
+               if (!blocknr) {
+                       if (!error)
+                               error = -ENOSPC;
                        return error;
+               }
 
                bh->b_dev = inode->i_dev;
                bh->b_blocknr = blocknr;
index 55d5325dee18bd6408909d8090439bbd2dccec4c..d808fc3062c9622770797488b044d691c9127169 100644 (file)
@@ -444,7 +444,7 @@ repeat:
                *err = 0;
                *created = 1;
        }
-       if (le32_to_cpu(*p)) {
+       if (*p) {
                ext2_free_blocks (inode, tmp, 1);
                brelse (result);
                goto repeat;
index b6f57efb0fac70af2c37659beaba7152c721dd77..af6e2e9412c5a9b3d08720cf00b642a515145410 100644 (file)
@@ -141,7 +141,7 @@ static int check_block_empty(struct inode *inode, struct buffer_head *bh,
                bforget(bh);
                if (ind_bh)
                        mark_buffer_dirty(ind_bh, 1);
-               ext2_free_blocks (inode, tmp, 1);
+               ext2_free_blocks(inode, tmp, 1);
                goto out;
        }
        retry = 1;
@@ -162,7 +162,6 @@ out:
 
 static int trunc_direct (struct inode * inode)
 {
-       struct buffer_head * bh;
        int i, retry = 0;
        unsigned long block_to_free = 0, free_count = 0;
        int blocks = inode->i_sb->s_blocksize / 512;
@@ -175,19 +174,9 @@ static int trunc_direct (struct inode * inode)
                if (!tmp)
                        continue;
 
-               bh = find_buffer(inode->i_dev, tmp, inode->i_sb->s_blocksize);
-               if (bh) {
-                       if (DATA_BUFFER_USED(bh)) {
-                               retry = 1;
-                               continue;
-                       }
-                       bh->b_count++;
-               }
-
                *p = 0;
                inode->i_blocks -= blocks;
                mark_inode_dirty(inode);
-               bforget(bh);
 
                /* accumulate blocks to free if they're contiguous */
                if (free_count == 0)
@@ -206,8 +195,7 @@ static int trunc_direct (struct inode * inode)
        return retry;
 }
 
-static int trunc_indirect (struct inode * inode, int offset, u32 * p,
-                       struct buffer_head *dind_bh)
+static int trunc_indirect (struct inode * inode, int offset, u32 * p, struct buffer_head *dind_bh)
 {
        struct buffer_head * ind_bh;
        int i, tmp, retry = 0;
@@ -242,28 +230,15 @@ static int trunc_indirect (struct inode * inode, int offset, u32 * p,
                indirect_block = 0;
        for (i = indirect_block ; i < addr_per_block ; i++) {
                u32 * ind = i + (u32 *) ind_bh->b_data;
-               struct buffer_head * bh;
 
                wait_on_buffer(ind_bh);
                tmp = le32_to_cpu(*ind);
                if (!tmp)
                        continue;
-               /*
-                * Use find_buffer so we don't block here.
-                */
-               bh = find_buffer(inode->i_dev, tmp, inode->i_sb->s_blocksize);
-               if (bh) {
-                       if (DATA_BUFFER_USED(bh)) {
-                               retry = 1;
-                               continue;
-                       }
-                       bh->b_count++;
-               }
 
                *ind = 0;
                inode->i_blocks -= blocks;
                mark_inode_dirty(inode);
-               bforget(bh);
                mark_buffer_dirty(ind_bh, 1);
 
                /* accumulate blocks to free if they're contiguous */
index e47e3b0b4ca070e3e8920bcd4548d2302c7847b9..2c4299918100ffdf3aaffe42ab345ffdc20dc33e 100644 (file)
@@ -181,17 +181,13 @@ int do_select(int n, fd_set_bits *fds, long *timeout)
                        off = i / __NFDBITS;
                        if (!(bit & BITS(fds, off)))
                                continue;
-                       /*
-                        * The poll_wait routine will increment f_count if
-                        * the file is added to the wait table, so we don't
-                        * need to increment it now.
-                        */
-                       file = fcheck(i);
+                       file = fget(i);
                        mask = POLLNVAL;
                        if (file) {
                                mask = DEFAULT_POLLMASK;
                                if (file->f_op && file->f_op->poll)
                                        mask = file->f_op->poll(file, wait);
+                               fput(file);
                        }
                        if ((mask & POLLIN_SET) && ISSET(bit, __IN(fds,off))) {
                                SET(bit, __RES_IN(fds,off));
@@ -347,14 +343,14 @@ static int do_poll(unsigned int nfds, struct pollfd *fds, poll_table *wait,
                        mask = 0;
                        fd = fdpnt->fd;
                        if (fd >= 0) {
-                               /* poll_wait increments f_count if needed */
-                               struct file * file = fcheck(fd);
+                               struct file * file = fget(fd);
                                mask = POLLNVAL;
                                if (file != NULL) {
                                        mask = DEFAULT_POLLMASK;
                                        if (file->f_op && file->f_op->poll)
                                                mask = file->f_op->poll(file, wait);
                                        mask &= fdpnt->events | POLLERR | POLLHUP;
+                                       fput(file);
                                }
                                if (mask) {
                                        wait = NULL;
index a5d4cd3b429c1ef08926866a37eb3beacefff41c..7fb80f0a0501dc768ed0775234144bb6e8e0c6a2 100644 (file)
@@ -21,7 +21,6 @@ struct linux_binprm{
        unsigned long page[MAX_ARG_PAGES];
        unsigned long p; /* current top of mem */
        int sh_bang;
-       int java;               /* Java binary, prevent recursive invocation */
        struct dentry * dentry;
        int e_uid, e_gid;
        kernel_cap_t cap_inheritable, cap_permitted, cap_effective;
@@ -55,7 +54,6 @@ extern int init_elf32_binfmt(void);
 extern int init_aout_binfmt(void);
 extern int init_aout32_binfmt(void);
 extern int init_script_binfmt(void);
-extern int init_java_binfmt(void);
 extern int init_em86_binfmt(void);
 extern int init_misc_binfmt(void);
 
index b5b46b7f18af57c3786d9e51b1c9e4ce014638e1..5d9eedc1d12b4f8d453ce81db68e89875b0cb826 100644 (file)
@@ -82,8 +82,6 @@ enum
        KERN_PANIC=15,          /* int: panic timeout */
        KERN_REALROOTDEV=16,    /* real root device to mount after initrd */
 
-       KERN_JAVA_INTERPRETER=19, /* path to Java(tm) interpreter */
-       KERN_JAVA_APPLETVIEWER=20, /* path to Java(tm) appletviewer */
        KERN_SPARC_REBOOT=21,   /* reboot command on Sparc */
        KERN_CTLALTDEL=22,      /* int: allow ctl-alt-del to reboot */
        KERN_PRINTK=23,         /* struct: control printk logging parameters */
index 2d4fb7169d221134dade0d327d776e4ee692cdaa..2c7388a3ef0e2fba3166385dc68a324669d9569e 100644 (file)
@@ -34,7 +34,6 @@
 extern int panic_timeout;
 extern int console_loglevel, C_A_D;
 extern int bdf_prm[], bdflush_min[], bdflush_max[];
-extern char binfmt_java_interpreter[], binfmt_java_appletviewer[];
 extern int sysctl_overcommit_memory;
 extern int nr_queued_signals, max_queued_signals;
 
@@ -171,12 +170,6 @@ static ctl_table kern_table[] = {
        {KERN_REALROOTDEV, "real-root-dev", &real_root_dev, sizeof(int),
         0644, NULL, &proc_dointvec},
 #endif
-#ifdef CONFIG_BINFMT_JAVA
-       {KERN_JAVA_INTERPRETER, "java-interpreter", binfmt_java_interpreter,
-        64, 0644, NULL, &proc_dostring, &sysctl_string },
-       {KERN_JAVA_APPLETVIEWER, "java-appletviewer", binfmt_java_appletviewer,
-        64, 0644, NULL, &proc_dostring, &sysctl_string },
-#endif
 #ifdef __sparc__
        {KERN_SPARC_REBOOT, "reboot-cmd", reboot_command,
         256, 0644, NULL, &proc_dostring, &sysctl_string },