Merge branch 'master' into gfs2
authorSteven Whitehouse <swhiteho@redhat.com>
Mon, 2 Oct 2006 12:45:08 +0000 (08:45 -0400)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 2 Oct 2006 12:45:08 +0000 (08:45 -0400)
1  2 
CREDITS
MAINTAINERS
fs/Kconfig
fs/Makefile
include/linux/Kbuild
mm/filemap.c

diff --combined CREDITS
+++ b/CREDITS
@@@ -1620,7 -1620,8 +1620,8 @@@ D: fbdev hackin
  
  N: Jesper Juhl
  E: jesper.juhl@gmail.com
- D: Various fixes, cleanups and minor features.
+ D: Various fixes, cleanups and minor features all over the tree.
+ D: Wrote initial version of the hdaps driver (since passed on to others).
  S: Lemnosvej 1, 3.tv
  S: 2300 Copenhagen S.
  S: Denmark
@@@ -2477,7 -2478,8 +2478,8 @@@ S: Derbyshire DE4 3R
  S: United Kingdom
  
  N: Ian S. Nelson
- E: ian.nelson@echostar.com
+ E: nelsonis@earthlink.net
+ P: 1024D/00D3D983 3EFD 7B86 B888 D7E2 29B6  9E97 576F 1B97 00D3 D983
  D: Minor mmap and ide hacks
  S: 1370 Atlantis Ave.
  S: Lafayette CO, 80026
@@@ -3548,11 -3550,11 +3550,11 @@@ S: Fargo, North Dakota 5812
  S: USA
  
  N: Steven Whitehouse
 -E: SteveW@ACM.org
 +E: steve@chygwyn.com
  W: http://www.chygwyn.com/~steve
 -D: Linux DECnet project: http://www.sucs.swan.ac.uk/~rohan/DECnet/index.html
 +D: Linux DECnet project
  D: Minor debugging of other networking protocols.
 -D: Misc bug fixes and filesystem development
 +D: Misc bug fixes and GFS2 filesystem development
  
  N: Hans-Joachim Widmaier
  E: hjw@zvw.de
diff --combined MAINTAINERS
@@@ -501,7 -501,7 +501,7 @@@ S: Maintaine
  
  BLOCK LAYER
  P:    Jens Axboe
- M:    axboe@suse.de
+ M:    axboe@kernel.dk
  L:    linux-kernel@vger.kernel.org
  T:    git kernel.org:/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git
  S:    Maintained
@@@ -851,7 -851,7 +851,7 @@@ P: Doug Warzech
  M:    Douglas_Warzecha@dell.com
  S:    Maintained
  
- DEVICE-MAPPER
+ DEVICE-MAPPER  (LVM)
  P:    Alasdair Kergon
  L:    dm-devel@redhat.com
  W:    http://sources.redhat.com/dm
@@@ -900,16 -900,6 +900,16 @@@ M:       jack@suse.c
  L:    linux-kernel@vger.kernel.org
  S:    Maintained
  
 +DISTRIBUTED LOCK MANAGER
 +P:    Patrick Caulfield
 +M:    pcaulfie@redhat.com
 +P:    David Teigland
 +M:    teigland@redhat.com
 +L:    cluster-devel@redhat.com
 +W:    http://sources.redhat.com/cluster/
 +T:    git kernel.org:/pub/scm/linux/kernel/git/steve/gfs-2.6.git
 +S:    Supported
 +
  DAVICOM FAST ETHERNET (DMFE) NETWORK DRIVER
  P:    Tobias Ringstrom
  M:    tori@unhappy.mine.nu
@@@ -1178,14 -1168,6 +1178,14 @@@ M:    khc@pm.waw.p
  W:    http://www.kernel.org/pub/linux/utils/net/hdlc/
  S:    Maintained
  
 +GFS2 FILE SYSTEM
 +P:    Steven Whitehouse
 +M:    swhiteho@redhat.com
 +L:    cluster-devel@redhat.com
 +W:    http://sources.redhat.com/cluster/
 +T:    git kernel.org:/pub/scm/linux/kernel/git/steve/gfs-2.6.git
 +S:    Supported
 +
  GIGASET ISDN DRIVERS
  P:    Hansjoerg Lipp
  M:    hjlipp@web.de
@@@ -1398,7 -1380,7 +1398,7 @@@ S:      Maintaine
  
  IDE/ATAPI CDROM DRIVER
  P:    Jens Axboe
- M:    axboe@suse.de
+ M:    axboe@kernel.dk
  L:    linux-kernel@vger.kernel.org
  W:    http://www.kernel.dk
  S:    Maintained
@@@ -1416,36 -1398,29 +1416,29 @@@ M:   Gadi Oxman <gadio@netvision.net.il
  L:    linux-kernel@vger.kernel.org
  S:    Maintained
  
- IEEE 1394 ETHERNET (eth1394)
- L:    linux1394-devel@lists.sourceforge.net
- W:    http://www.linux1394.org/
- S:    Orphan
  IEEE 1394 SUBSYSTEM
  P:    Ben Collins
  M:    bcollins@debian.org
- P:    Jody McIntyre
- M:    scjody@modernduck.com
+ P:    Stefan Richter
+ M:    stefanr@s5r6.in-berlin.de
  L:    linux1394-devel@lists.sourceforge.net
  W:    http://www.linux1394.org/
- T:    git kernel.org:/pub/scm/linux/kernel/git/scjody/ieee1394.git
+ T:    git kernel.org:/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git
  S:    Maintained
  
- IEEE 1394 OHCI DRIVER
- P:    Ben Collins
- M:    bcollins@debian.org
- P:    Jody McIntyre
- M:    scjody@modernduck.com
+ IEEE 1394 IPV4 DRIVER (eth1394)
+ P:    Stefan Richter
+ M:    stefanr@s5r6.in-berlin.de
  L:    linux1394-devel@lists.sourceforge.net
- W:    http://www.linux1394.org/
- S:    Maintained
+ S:    Odd Fixes
  
  IEEE 1394 PCILYNX DRIVER
  P:    Jody McIntyre
  M:    scjody@modernduck.com
+ P:    Stefan Richter
+ M:    stefanr@s5r6.in-berlin.de
  L:    linux1394-devel@lists.sourceforge.net
- W:    http://www.linux1394.org/
- S:    Maintained
+ S:    Odd Fixes
  
  IEEE 1394 RAW I/O DRIVER
  P:    Ben Collins
@@@ -1453,16 -1428,6 +1446,6 @@@ M:     bcollins@debian.or
  P:    Dan Dennedy
  M:    dan@dennedy.org
  L:    linux1394-devel@lists.sourceforge.net
- W:    http://www.linux1394.org/
- S:    Maintained
- IEEE 1394 SBP2
- P:    Ben Collins
- M:    bcollins@debian.org
- P:    Stefan Richter
- M:    stefanr@s5r6.in-berlin.de
- L:    linux1394-devel@lists.sourceforge.net
- W:    http://www.linux1394.org/
  S:    Maintained
  
  IMS TWINTURBO FRAMEBUFFER DRIVER
@@@ -2080,7 -2045,7 +2063,7 @@@ L:      linux-hams@vger.kernel.or
  W:    http://www.linux-ax25.org/
  S:    Maintained
  
- NETWORK BLOCK DEVICE
+ NETWORK BLOCK DEVICE (NBD)
  P:    Paul Clements
  M:    Paul.Clements@steeleye.com
  S:    Maintained
@@@ -2566,7 -2531,7 +2549,7 @@@ S:      Maintaine
  
  SCSI CDROM DRIVER
  P:    Jens Axboe
- M:    axboe@suse.de
+ M:    axboe@kernel.dk
  L:    linux-scsi@vger.kernel.org
  W:    http://www.kernel.dk
  S:    Maintained
@@@ -2828,6 -2793,12 +2811,12 @@@ M:    R.E.Wolff@BitWizard.n
  L:    linux-kernel@vger.kernel.org ?
  S:    Supported
  
+ SPIDERNET NETWORK DRIVER for CELL
+ P:    Jim Lewis
+ M:    jim@jklewis.com
+ L:    netdev@vger.kernel.org
+ S:    Supported
  SRM (Alpha) environment access
  P:    Jan-Benedict Glaw
  M:    jbglaw@lug-owl.de
@@@ -2852,12 -2823,9 +2841,9 @@@ S:     Maintaine
  SUPERH (sh)
  P:    Paul Mundt
  M:    lethal@linux-sh.org
- P:    Kazumoto Kojima
- M:    kkojima@rr.iij4u.or.jp
- L:    linuxsh-dev@lists.sourceforge.net
+ L:    linuxsh-dev@lists.sourceforge.net (subscribers-only)
  W:    http://www.linux-sh.org
  W:    http://www.m17n.org/linux-sh/
- W:    http://www.rr.iij4u.or.jp/~kkojima/linux-sh4.html
  S:    Maintained
  
  SUPERH64 (sh64)
@@@ -3008,7 -2976,7 +2994,7 @@@ S:      Maintaine
  
  UNIFORM CDROM DRIVER
  P:    Jens Axboe
- M:    axboe@suse.de
+ M:    axboe@kernel.dk
  L:    linux-kernel@vger.kernel.org
  W:    http://www.kernel.dk
  S:    Maintained
@@@ -3327,6 -3295,12 +3313,12 @@@ W:    http://linuxtv.or
  T:    git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git
  S:    Maintained
  
+ VT1211 HARDWARE MONITOR DRIVER
+ P:    Juerg Haefliger
+ M:    juergh@gmail.com
+ L:    lm-sensors@lm-sensors.org
+ S:    Maintained
  VT8231 HARDWARE MONITOR DRIVER
  P:    Roger Lucas
  M:    roger@planbit.co.uk
diff --combined fs/Kconfig
@@@ -4,6 -4,8 +4,8 @@@
  
  menu "File systems"
  
+ if BLOCK
  config EXT2_FS
        tristate "Second extended fs support"
        help
@@@ -323,7 -325,6 +325,7 @@@ config FS_POSIX_AC
        default n
  
  source "fs/xfs/Kconfig"
 +source "fs/gfs2/Kconfig"
  
  config OCFS2_FS
        tristate "OCFS2 file system support"
@@@ -400,6 -401,8 +402,8 @@@ config ROMFS_F
          If you don't know whether you need it, then you don't need it:
          answer N.
  
+ endif
  config INOTIFY
        bool "Inotify file change notification support"
        default y
@@@ -531,6 -534,7 +535,7 @@@ config FUSE_F
          If you want to develop a userspace FS, or if you want to use
          a filesystem based on FUSE, answer Y or M.
  
+ if BLOCK
  menu "CD-ROM/DVD Filesystems"
  
  config ISO9660_FS
@@@ -598,7 -602,9 +603,9 @@@ config UDF_NL
        depends on (UDF_FS=m && NLS) || (UDF_FS=y && NLS=y)
  
  endmenu
+ endif
  
+ if BLOCK
  menu "DOS/FAT/NT Filesystems"
  
  config FAT_FS
@@@ -783,6 -789,7 +790,7 @@@ config NTFS_R
          It is perfectly safe to say N here.
  
  endmenu
+ endif
  
  menu "Pseudo filesystems"
  
@@@ -882,6 -889,19 +890,19 @@@ config TMPF
  
          See <file:Documentation/filesystems/tmpfs.txt> for details.
  
+ config TMPFS_POSIX_ACL
+       bool "Tmpfs POSIX Access Control Lists"
+       depends on TMPFS
+       select GENERIC_ACL
+       help
+         POSIX Access Control Lists (ACLs) support permissions for users and
+         groups beyond the owner/group/world scheme.
+         To learn more about Access Control Lists, visit the POSIX ACLs for
+         Linux website <http://acl.bestbits.at/>.
+         If you don't know what Access Control Lists are, say N.
  config HUGETLBFS
        bool "HugeTLB file system support"
        depends X86 || IA64 || PPC64 || SPARC64 || SUPERH || BROKEN
@@@ -927,7 -947,7 +948,7 @@@ menu "Miscellaneous filesystems
  
  config ADFS_FS
        tristate "ADFS file system support (EXPERIMENTAL)"
-       depends on EXPERIMENTAL
+       depends on BLOCK && EXPERIMENTAL
        help
          The Acorn Disc Filing System is the standard file system of the
          RiscOS operating system which runs on Acorn's ARM-based Risc PC
@@@ -955,7 -975,7 +976,7 @@@ config ADFS_FS_R
  
  config AFFS_FS
        tristate "Amiga FFS file system support (EXPERIMENTAL)"
-       depends on EXPERIMENTAL
+       depends on BLOCK && EXPERIMENTAL
        help
          The Fast File System (FFS) is the common file system used on hard
          disks by Amiga(tm) systems since AmigaOS Version 1.3 (34.20).  Say Y
  
  config HFS_FS
        tristate "Apple Macintosh file system support (EXPERIMENTAL)"
-       depends on EXPERIMENTAL
+       depends on BLOCK && EXPERIMENTAL
        select NLS
        help
          If you say Y here, you will be able to mount Macintosh-formatted
  
  config HFSPLUS_FS
        tristate "Apple Extended HFS file system support"
+       depends on BLOCK
        select NLS
        select NLS_UTF8
        help
  
  config BEFS_FS
        tristate "BeOS file system (BeFS) support (read only) (EXPERIMENTAL)"
-       depends on EXPERIMENTAL
+       depends on BLOCK && EXPERIMENTAL
        select NLS
        help
          The BeOS File System (BeFS) is the native file system of Be, Inc's
@@@ -1030,7 -1051,7 +1052,7 @@@ config BEFS_DEBU
  
  config BFS_FS
        tristate "BFS file system support (EXPERIMENTAL)"
-       depends on EXPERIMENTAL
+       depends on BLOCK && EXPERIMENTAL
        help
          Boot File System (BFS) is a file system used under SCO UnixWare to
          allow the bootloader access to the kernel image and other important
  
  config EFS_FS
        tristate "EFS file system support (read only) (EXPERIMENTAL)"
-       depends on EXPERIMENTAL
+       depends on BLOCK && EXPERIMENTAL
        help
          EFS is an older file system used for non-ISO9660 CD-ROMs and hard
          disk partitions by SGI's IRIX operating system (IRIX 6.0 and newer
  
  config JFFS_FS
        tristate "Journalling Flash File System (JFFS) support"
-       depends on MTD
+       depends on MTD && BLOCK
        help
          JFFS is the Journaling Flash File System developed by Axis
          Communications in Sweden, aimed at providing a crash/powerdown-safe
@@@ -1252,6 -1273,7 +1274,7 @@@ endchoic
  
  config CRAMFS
        tristate "Compressed ROM file system support (cramfs)"
+       depends on BLOCK
        select ZLIB_INFLATE
        help
          Saying Y here includes support for CramFs (Compressed ROM File
  
  config VXFS_FS
        tristate "FreeVxFS file system support (VERITAS VxFS(TM) compatible)"
+       depends on BLOCK
        help
          FreeVxFS is a file system driver that support the VERITAS VxFS(TM)
          file system format.  VERITAS VxFS(TM) is the standard file system
  
  config HPFS_FS
        tristate "OS/2 HPFS file system support"
+       depends on BLOCK
        help
          OS/2 is IBM's operating system for PC's, the same as Warp, and HPFS
          is the file system used for organizing files on OS/2 hard disk
  
  config QNX4FS_FS
        tristate "QNX4 file system support (read only)"
+       depends on BLOCK
        help
          This is the file system used by the real-time operating systems
          QNX 4 and QNX 6 (the latter is also called QNX RTP).
@@@ -1331,6 -1356,7 +1357,7 @@@ config QNX4FS_R
  
  config SYSV_FS
        tristate "System V/Xenix/V7/Coherent file system support"
+       depends on BLOCK
        help
          SCO, Xenix and Coherent are commercial Unix systems for Intel
          machines, and Version 7 was used on the DEC PDP-11. Saying Y
  
  config UFS_FS
        tristate "UFS file system support (read only)"
+       depends on BLOCK
        help
          BSD and derivate versions of Unix (such as SunOS, FreeBSD, NetBSD,
          OpenBSD and NeXTstep) use a file system called UFS. Some System V
@@@ -1941,16 -1968,21 +1969,22 @@@ config 9P_F
  
          If unsure, say N.
  
+ config GENERIC_ACL
+       bool
+       select FS_POSIX_ACL
  endmenu
  
+ if BLOCK
  menu "Partition Types"
  
  source "fs/partitions/Kconfig"
  
  endmenu
+ endif
  
  source "fs/nls/Kconfig"
 +source "fs/dlm/Kconfig"
  
  endmenu
  
diff --combined fs/Makefile
@@@ -5,12 -5,18 +5,18 @@@
  # Rewritten to use lists instead of if-statements.
  # 
  
- obj-y :=      open.o read_write.o file_table.o buffer.o  bio.o super.o \
-               block_dev.o char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \
+ obj-y :=      open.o read_write.o file_table.o super.o \
+               char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \
                ioctl.o readdir.o select.o fifo.o locks.o dcache.o inode.o \
                attr.o bad_inode.o file.o filesystems.o namespace.o aio.o \
-               seq_file.o xattr.o libfs.o fs-writeback.o mpage.o direct-io.o \
-               ioprio.o pnode.o drop_caches.o splice.o sync.o
+               seq_file.o xattr.o libfs.o fs-writeback.o \
+               pnode.o drop_caches.o splice.o sync.o utimes.o
+ ifeq ($(CONFIG_BLOCK),y)
+ obj-y +=      buffer.o bio.o block_dev.o direct-io.o mpage.o ioprio.o
+ else
+ obj-y +=      no-block.o
+ endif
  
  obj-$(CONFIG_INOTIFY)         += inotify.o
  obj-$(CONFIG_INOTIFY_USER)    += inotify_user.o
@@@ -35,6 -41,7 +41,7 @@@ obj-$(CONFIG_BINFMT_FLAT)     += binfmt_fla
  obj-$(CONFIG_FS_MBCACHE)      += mbcache.o
  obj-$(CONFIG_FS_POSIX_ACL)    += posix_acl.o xattr_acl.o
  obj-$(CONFIG_NFS_COMMON)      += nfs_common/
+ obj-$(CONFIG_GENERIC_ACL)     += generic_acl.o
  
  obj-$(CONFIG_QUOTA)           += dquot.o
  obj-$(CONFIG_QFMT_V1)         += quota_v1.o
@@@ -50,7 -57,6 +57,7 @@@ obj-$(CONFIG_CONFIGFS_FS)     += configfs
  obj-y                         += devpts/
  
  obj-$(CONFIG_PROFILING)               += dcookies.o
 +obj-$(CONFIG_DLM)             += dlm/
   
  # Do not add any filesystems before this line
  obj-$(CONFIG_REISERFS_FS)     += reiserfs/
@@@ -103,4 -109,3 +110,4 @@@ obj-$(CONFIG_HOSTFS)               += hostfs
  obj-$(CONFIG_HPPFS)           += hppfs/
  obj-$(CONFIG_DEBUG_FS)                += debugfs/
  obj-$(CONFIG_OCFS2_FS)                += ocfs2/
 +obj-$(CONFIG_GFS2_FS)           += gfs2/
diff --combined include/linux/Kbuild
@@@ -46,7 -46,6 +46,7 @@@ header-y += coff.
  header-y += comstats.h
  header-y += consolemap.h
  header-y += cycx_cfm.h
 +header-y += dlm_device.h
  header-y += dm-ioctl.h
  header-y += dn.h
  header-y += dqblk_v1.h
@@@ -59,6 -58,7 +59,7 @@@ header-y += elf-em.
  header-y += fadvise.h
  header-y += fd.h
  header-y += fdreg.h
+ header-y += fib_rules.h
  header-y += ftape-header-segment.h
  header-y += ftape-vendors.h
  header-y += fuse.h
@@@ -71,6 -71,7 +72,7 @@@ header-y += hysdn_if.
  header-y += i2c-dev.h
  header-y += i8k.h
  header-y += icmp.h
+ header-y += if_addr.h
  header-y += if_arcnet.h
  header-y += if_arp.h
  header-y += if_bonding.h
@@@ -80,6 -81,7 +82,7 @@@ header-y += if_fddi.
  header-y += if.h
  header-y += if_hippi.h
  header-y += if_infiniband.h
+ header-y += if_link.h
  header-y += if_packet.h
  header-y += if_plip.h
  header-y += if_ppp.h
@@@ -102,7 -104,6 +105,7 @@@ header-y += ixjuser.
  header-y += jffs2.h
  header-y += keyctl.h
  header-y += limits.h
 +header-y += lock_dlm_plock.h
  header-y += magic.h
  header-y += major.h
  header-y += matroxfb.h
@@@ -112,6 -113,7 +115,7 @@@ header-y += mmtimer.
  header-y += mqueue.h
  header-y += mtio.h
  header-y += ncp_no.h
+ header-y += neighbour.h
  header-y += netfilter_arp.h
  header-y += netrom.h
  header-y += nfs2.h
@@@ -192,7 -194,6 +196,7 @@@ unifdef-y += cyclades.
  unifdef-y += dccp.h
  unifdef-y += dirent.h
  unifdef-y += divert.h
 +unifdef-y += dlm.h
  unifdef-y += elfcore.h
  unifdef-y += errno.h
  unifdef-y += errqueue.h
@@@ -209,7 -210,6 +213,7 @@@ unifdef-y += ftape.
  unifdef-y += gameport.h
  unifdef-y += generic_serial.h
  unifdef-y += genhd.h
 +unifdef-y += gfs2_ondisk.h
  unifdef-y += hayesesp.h
  unifdef-y += hdlcdrv.h
  unifdef-y += hdlc.h
@@@ -219,7 -219,6 +223,7 @@@ unifdef-y += hpet.
  unifdef-y += i2c.h
  unifdef-y += i2o-dev.h
  unifdef-y += icmpv6.h
 +unifdef-y += iflags.h
  unifdef-y += if_bridge.h
  unifdef-y += if_ec.h
  unifdef-y += if_eql.h
diff --combined mm/filemap.c
@@@ -1149,13 -1149,14 +1149,14 @@@ success
   * that can use the page cache directly.
   */
  ssize_t
__generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
-               unsigned long nr_segs, loff_t *ppos)
+ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
+               unsigned long nr_segs, loff_t pos)
  {
        struct file *filp = iocb->ki_filp;
        ssize_t retval;
        unsigned long seg;
        size_t count;
+       loff_t *ppos = &iocb->ki_pos;
  
        count = 0;
        for (seg = 0; seg < nr_segs; seg++) {
  
        /* coalesce the iovecs and go direct-to-BIO for O_DIRECT */
        if (filp->f_flags & O_DIRECT) {
-               loff_t pos = *ppos, size;
+               loff_t size;
                struct address_space *mapping;
                struct inode *inode;
  
                        if (retval > 0)
                                *ppos = pos + retval;
                }
 -              file_accessed(filp);
 -              goto out;
 +              if (likely(retval != 0)) {
 +                      file_accessed(filp);
 +                      goto out;
 +              }
        }
  
        retval = 0;
  out:
        return retval;
  }
- EXPORT_SYMBOL(__generic_file_aio_read);
- ssize_t
- generic_file_aio_read(struct kiocb *iocb, char __user *buf, size_t count, loff_t pos)
- {
-       struct iovec local_iov = { .iov_base = buf, .iov_len = count };
-       BUG_ON(iocb->ki_pos != pos);
-       return __generic_file_aio_read(iocb, &local_iov, 1, &iocb->ki_pos);
- }
  EXPORT_SYMBOL(generic_file_aio_read);
  
- ssize_t
- generic_file_read(struct file *filp, char __user *buf, size_t count, loff_t *ppos)
- {
-       struct iovec local_iov = { .iov_base = buf, .iov_len = count };
-       struct kiocb kiocb;
-       ssize_t ret;
-       init_sync_kiocb(&kiocb, filp);
-       ret = __generic_file_aio_read(&kiocb, &local_iov, 1, ppos);
-       if (-EIOCBQUEUED == ret)
-               ret = wait_on_sync_kiocb(&kiocb);
-       return ret;
- }
- EXPORT_SYMBOL(generic_file_read);
  int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size)
  {
        ssize_t written;
@@@ -1473,7 -1447,7 +1449,7 @@@ outside_data_content
         * accessible..
         */
        if (area->vm_mm == current->mm)
-               return NULL;
+               return NOPAGE_SIGBUS;
        /* Fall through to the non-read-ahead case */
  no_cached_page:
        /*
         */
        if (error == -ENOMEM)
                return NOPAGE_OOM;
-       return NULL;
+       return NOPAGE_SIGBUS;
  
  page_not_uptodate:
        if (!did_readaround) {
         */
        shrink_readahead_size_eio(file, ra);
        page_cache_release(page);
-       return NULL;
+       return NOPAGE_SIGBUS;
  }
  EXPORT_SYMBOL(filemap_nopage);
  
@@@ -2022,6 -1996,7 +1998,7 @@@ inline int generic_write_checks(struct 
                if (unlikely(*pos + *count > inode->i_sb->s_maxbytes))
                        *count = inode->i_sb->s_maxbytes - *pos;
        } else {
+ #ifdef CONFIG_BLOCK
                loff_t isize;
                if (bdev_read_only(I_BDEV(inode)))
                        return -EPERM;
  
                if (*pos + *count > isize)
                        *count = isize - *pos;
+ #else
+               return -EPERM;
+ #endif
        }
        return 0;
  }
        current->backing_dev_info = NULL;
        return written ? written : err;
  }
- EXPORT_SYMBOL(generic_file_aio_write_nolock);
  
- ssize_t
- generic_file_aio_write_nolock(struct kiocb *iocb, const struct iovec *iov,
-                               unsigned long nr_segs, loff_t *ppos)
+ ssize_t generic_file_aio_write_nolock(struct kiocb *iocb,
+               const struct iovec *iov, unsigned long nr_segs, loff_t pos)
  {
        struct file *file = iocb->ki_filp;
        struct address_space *mapping = file->f_mapping;
        struct inode *inode = mapping->host;
        ssize_t ret;
-       loff_t pos = *ppos;
  
-       ret = __generic_file_aio_write_nolock(iocb, iov, nr_segs, ppos);
+       BUG_ON(iocb->ki_pos != pos);
+       ret = __generic_file_aio_write_nolock(iocb, iov, nr_segs,
+                       &iocb->ki_pos);
  
        if (ret > 0 && ((file->f_flags & O_SYNC) || IS_SYNC(inode))) {
-               int err;
+               ssize_t err;
  
                err = sync_page_range_nolock(inode, mapping, pos, ret);
                if (err < 0)
        }
        return ret;
  }
+ EXPORT_SYMBOL(generic_file_aio_write_nolock);
  
- static ssize_t
- __generic_file_write_nolock(struct file *file, const struct iovec *iov,
-                               unsigned long nr_segs, loff_t *ppos)
- {
-       struct kiocb kiocb;
-       ssize_t ret;
-       init_sync_kiocb(&kiocb, file);
-       ret = __generic_file_aio_write_nolock(&kiocb, iov, nr_segs, ppos);
-       if (ret == -EIOCBQUEUED)
-               ret = wait_on_sync_kiocb(&kiocb);
-       return ret;
- }
- ssize_t
- generic_file_write_nolock(struct file *file, const struct iovec *iov,
-                               unsigned long nr_segs, loff_t *ppos)
- {
-       struct kiocb kiocb;
-       ssize_t ret;
-       init_sync_kiocb(&kiocb, file);
-       ret = generic_file_aio_write_nolock(&kiocb, iov, nr_segs, ppos);
-       if (-EIOCBQUEUED == ret)
-               ret = wait_on_sync_kiocb(&kiocb);
-       return ret;
- }
- EXPORT_SYMBOL(generic_file_write_nolock);
- ssize_t generic_file_aio_write(struct kiocb *iocb, const char __user *buf,
-                              size_t count, loff_t pos)
+ ssize_t generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
+               unsigned long nr_segs, loff_t pos)
  {
        struct file *file = iocb->ki_filp;
        struct address_space *mapping = file->f_mapping;
        struct inode *inode = mapping->host;
        ssize_t ret;
-       struct iovec local_iov = { .iov_base = (void __user *)buf,
-                                       .iov_len = count };
  
        BUG_ON(iocb->ki_pos != pos);
  
        mutex_lock(&inode->i_mutex);
-       ret = __generic_file_aio_write_nolock(iocb, &local_iov, 1,
-                                               &iocb->ki_pos);
+       ret = __generic_file_aio_write_nolock(iocb, iov, nr_segs,
+                       &iocb->ki_pos);
        mutex_unlock(&inode->i_mutex);
  
        if (ret > 0 && ((file->f_flags & O_SYNC) || IS_SYNC(inode))) {
  }
  EXPORT_SYMBOL(generic_file_aio_write);
  
- ssize_t generic_file_write(struct file *file, const char __user *buf,
-                          size_t count, loff_t *ppos)
- {
-       struct address_space *mapping = file->f_mapping;
-       struct inode *inode = mapping->host;
-       ssize_t ret;
-       struct iovec local_iov = { .iov_base = (void __user *)buf,
-                                       .iov_len = count };
-       mutex_lock(&inode->i_mutex);
-       ret = __generic_file_write_nolock(file, &local_iov, 1, ppos);
-       mutex_unlock(&inode->i_mutex);
-       if (ret > 0 && ((file->f_flags & O_SYNC) || IS_SYNC(inode))) {
-               ssize_t err;
-               err = sync_page_range(inode, mapping, *ppos - ret, ret);
-               if (err < 0)
-                       ret = err;
-       }
-       return ret;
- }
- EXPORT_SYMBOL(generic_file_write);
- ssize_t generic_file_readv(struct file *filp, const struct iovec *iov,
-                       unsigned long nr_segs, loff_t *ppos)
- {
-       struct kiocb kiocb;
-       ssize_t ret;
-       init_sync_kiocb(&kiocb, filp);
-       ret = __generic_file_aio_read(&kiocb, iov, nr_segs, ppos);
-       if (-EIOCBQUEUED == ret)
-               ret = wait_on_sync_kiocb(&kiocb);
-       return ret;
- }
- EXPORT_SYMBOL(generic_file_readv);
- ssize_t generic_file_writev(struct file *file, const struct iovec *iov,
-                       unsigned long nr_segs, loff_t *ppos)
- {
-       struct address_space *mapping = file->f_mapping;
-       struct inode *inode = mapping->host;
-       ssize_t ret;
-       mutex_lock(&inode->i_mutex);
-       ret = __generic_file_write_nolock(file, iov, nr_segs, ppos);
-       mutex_unlock(&inode->i_mutex);
-       if (ret > 0 && ((file->f_flags & O_SYNC) || IS_SYNC(inode))) {
-               int err;
-               err = sync_page_range(inode, mapping, *ppos - ret, ret);
-               if (err < 0)
-                       ret = err;
-       }
-       return ret;
- }
- EXPORT_SYMBOL(generic_file_writev);
  /*
   * Called under i_mutex for writes to S_ISREG files.   Returns -EIO if something
   * went wrong during pagecache shootdown.
@@@ -2493,3 -2381,33 +2383,33 @@@ generic_file_direct_IO(int rw, struct k
        }
        return retval;
  }
+ /**
+  * try_to_release_page() - release old fs-specific metadata on a page
+  *
+  * @page: the page which the kernel is trying to free
+  * @gfp_mask: memory allocation flags (and I/O mode)
+  *
+  * The address_space is to try to release any data against the page
+  * (presumably at page->private).  If the release was successful, return `1'.
+  * Otherwise return zero.
+  *
+  * The @gfp_mask argument specifies whether I/O may be performed to release
+  * this page (__GFP_IO), and whether the call may block (__GFP_WAIT).
+  *
+  * NOTE: @gfp_mask may go away, and this function may become non-blocking.
+  */
+ int try_to_release_page(struct page *page, gfp_t gfp_mask)
+ {
+       struct address_space * const mapping = page->mapping;
+       BUG_ON(!PageLocked(page));
+       if (PageWriteback(page))
+               return 0;
+       if (mapping && mapping->a_ops->releasepage)
+               return mapping->a_ops->releasepage(page, gfp_mask);
+       return try_to_free_buffers(page);
+ }
+ EXPORT_SYMBOL(try_to_release_page);