Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Wed, 4 Oct 2006 16:06:16 +0000 (09:06 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 4 Oct 2006 16:06:16 +0000 (09:06 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6: (292 commits)
  [GFS2] Fix endian bug for de_type
  [GFS2] Initialize SELinux extended attributes at inode creation time.
  [GFS2] Move logging code into log.c (mostly)
  [GFS2] Mark nlink cleared so VFS sees it happen
  [GFS2] Two redundant casts removed
  [GFS2] Remove uneeded endian conversion
  [GFS2] Remove duplicate sb reading code
  [GFS2] Mark metadata reads for blktrace
  [GFS2] Remove iflags.h, use FS_
  [GFS2] Fix code style/indent in ops_file.c
  [GFS2] streamline-generic_file_-interfaces-and-filemap gfs fix
  [GFS2] Remove readv/writev methods and use aio_read/aio_write instead (gfs bits)
  [GFS2] inode-diet: Eliminate i_blksize from the inode structure
  [GFS2] inode_diet: Replace inode.u.generic_ip with inode.i_private (gfs)
  [GFS2] Fix typo in last patch
  [GFS2] Fix direct i/o logic in filemap.c
  [GFS2] Fix bug in Makefiles for lock modules
  [GFS2] Remove (extra) fs_subsys declaration
  [GFS2/DLM] Fix trailing whitespace
  [GFS2] Tidy up meta_io code
  ...

1  2 
CREDITS
MAINTAINERS
fs/Kconfig
fs/Makefile
include/linux/Kbuild
include/linux/fs.h
mm/filemap.c

diff --combined CREDITS
+++ b/CREDITS
@@@ -34,7 -34,6 +34,7 @@@ E: magrawal@nortelnetworks.co
  D: Basic Interphase 5575 driver with UBR and ABR support.
  S: 75 Donald St, Apt 42
  S: Weymouth, MA 02188
 +S: USA
  
  N: Dave Airlie
  E: airlied@linux.ie
@@@ -203,7 -202,6 +203,7 @@@ S: MS4
  S: Hewlett-Packard
  S: 3404 E Harmony Rd
  S: Fort Collins, CO 80525
 +S: USA
  
  N: Arindam Banerji
  E: axb@cse.nd.edu
@@@ -446,7 -444,6 +446,7 @@@ E: rbradetich@uswest.ne
  D: Linux/PA-RISC hacker
  S: 1200 Goldenrod Dr.
  S: Nampa, Idaho 83686
 +S: USA
  
  N: Derrick J. Brashear
  E: shadow@dementia.org
@@@ -636,7 -633,6 +636,7 @@@ E: scole@lanl.go
  E: elenstev@mesatop.com
  D: Various build fixes and kernel documentation.
  S: Los Alamos, New Mexico
 +S: USA
  
  N: Hamish Coleman
  E: hamish@zot.apana.org.au
@@@ -955,12 -951,6 +955,12 @@@ S: Brevia 104
  S: S-114 79 Stockholm
  S: Sweden
  
 +N: Pekka Enberg
 +E: penberg@cs.helsinki.fi
 +W: http://www.cs.helsinki.fi/u/penberg/
 +D: Various kernel hacks, fixes, and cleanups.
 +S: Finland
 +
  N: David Engebretsen
  E: engebret@us.ibm.com
  D: Linux port to 64-bit PowerPC architecture
@@@ -2013,7 -2003,6 +2013,7 @@@ W: http://www.mathematik.uni-stuttgart.
  D: Busmaster driver for HP 10/100 Mbit Network Adapters
  S: University of Stuttgart, Germany and
  S: Ecole Nationale Superieure des Telecommunications, Paris
 +S: France
  
  N: Jamie Lokier
  E: jamie@shareable.org
@@@ -2183,7 -2172,6 +2183,7 @@@ S: Hewlett Packar
  S: MS 42
  S: 3404 E. Harmony Road
  S: Fort Collins, CO 80528
 +S: USA
  
  N: Torben Mathiasen
  E: torben.mathiasen@compaq.com
@@@ -2240,12 -2228,6 +2240,12 @@@ D: tc: HFSC schedule
  S: Freiburg
  S: Germany
  
 +N: Paul E. McKenney
 +E: paulmck@us.ibm.com
 +W: http://www.rdrop.com/users/paulmck/
 +D: RCU and variants
 +D: rcutorture module
 +
  N: Mike McLagan
  E: mike.mclagan@linux.org
  W: http://www.invlogic.com/~mmclagan
@@@ -2987,10 -2969,6 +2987,10 @@@ S: 69 rue Dunoi
  S: 75013 Paris
  S: France
  
 +N: Dipankar Sarma
 +E: dipankar@in.ibm.com
 +D: RCU
 +
  N: Hannu Savolainen
  E: hannu@opensound.com
  D: Maintainer of the sound drivers until 2.1.x days.
@@@ -3303,12 -3281,6 +3303,12 @@@ S: 3 Ballow Crescen
  S: MacGregor A.C.T 2615
  S: Australia
  
 +N: Josh Triplett
 +E: josh@freedesktop.org
 +P: 1024D/D0FE7AFB B24A 65C9 1D71 2AC2 DE87  CA26 189B 9946 D0FE 7AFB
 +D: rcutorture maintainer
 +D: lock annotations, finding and fixing lock bugs
 +
  N: Winfried Trümper
  E: winni@xpilot.org
  W: http://www.shop.de/~winni/
@@@ -3578,11 -3550,11 +3578,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
@@@ -3680,7 -3652,7 +3680,7 @@@ S: Portland, O
  S: USA
  
  N: Michal Wronski
 -E: Michal.Wronski@motorola.com
 +E: michal.wronski@gmail.com
  D: POSIX message queues fs (with K. Benedyczak)
  S: Krakow
  S: Poland
diff --combined MAINTAINERS
@@@ -144,9 -144,11 +144,9 @@@ L:        netdev@vger.kernel.or
  S:    Maintained
  
  8250/16?50 (AND CLONE UARTS) SERIAL DRIVER
 -P:    Russell King
 -M:    rmk+serial@arm.linux.org.uk
  L:    linux-serial@vger.kernel.org
  W:    http://serial.sourceforge.net
 -S:    Maintained
 +S:    Orphan
  
  8390 NETWORK DRIVERS [WD80x3/SMC-ELITE, SMC-ULTRA, NE2000, 3C503, etc.]
  P:    Paul Gortmaker
@@@ -898,6 -900,16 +898,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
@@@ -977,13 -989,6 +987,13 @@@ L:       ebtables-devel@lists.sourceforge.ne
  W:    http://ebtables.sourceforge.net/
  S:    Maintained
  
 +ECRYPT FILE SYSTEM
 +P:    Mike Halcrow, Phillip Hellewell
 +M:    mhalcrow@us.ibm.com, phillip@hellewell.homeip.net
 +L:    ecryptfs-devel@lists.sourceforge.net
 +W:    http://ecryptfs.sourceforge.net/
 +S:    Supported
 +
  EDAC-CORE
  P:    Doug Thompson
  M:    norsk5@xmission.com
@@@ -1173,6 -1178,14 +1183,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
@@@ -1900,6 -1913,11 +1918,6 @@@ M:     rroesler@syskonnect.d
  W:    http://www.syskonnect.com
  S:    Supported
  
 -MAESTRO PCI SOUND DRIVERS
 -P:    Zach Brown
 -M:    zab@zabbo.net
 -S:    Odd Fixes
 -
  MAN-PAGES: MANUAL PAGES FOR LINUX -- Sections 2, 3, 4, 5, and 7
  P: Michael Kerrisk
  M: mtk-manpages@gmx.net
@@@ -1986,7 -2004,9 +2004,7 @@@ W:      http://www.atnf.csiro.au/~rgooch/lin
  S:    Maintained
  
  MULTIMEDIA CARD (MMC) SUBSYSTEM
 -P:    Russell King
 -M:    rmk+mmc@arm.linux.org.uk
 -S:    Maintained
 +S:    Orphan
  
  MULTISOUND SOUND DRIVER
  P:    Andrew Veliath
@@@ -2436,19 -2456,6 +2454,19 @@@ M:    mporter@kernel.crashing.or
  L:    linux-kernel@vger.kernel.org
  S:    Maintained
  
 +READ-COPY UPDATE (RCU)
 +P:    Dipankar Sarma
 +M:    dipankar@in.ibm.com
 +W:    http://www.rdrop.com/users/paulmck/rclock/
 +L:    linux-kernel@vger.kernel.org
 +S:    Supported
 +
 +RCUTORTURE MODULE
 +P:    Josh Triplett
 +M:    josh@freedesktop.org
 +L:    linux-kernel@vger.kernel.org
 +S:    Maintained
 +
  REAL TIME CLOCK DRIVER
  P:    Paul Gortmaker
  M:    p_gortmaker@yahoo.com
@@@ -2722,6 -2729,14 +2740,6 @@@ M:     chrisw@sous-sol.or
  L:    stable@kernel.org
  S:    Maintained
  
 -STABLE BRANCH:
 -P:    Greg Kroah-Hartman
 -M:    greg@kroah.com
 -P:    Chris Wright
 -M:    chrisw@sous-sol.org
 -L:    stable@kernel.org
 -S:    Maintained
 -
  TPM DEVICE DRIVER
  P:    Kylene Hall
  M:    kjhall@us.ibm.com
@@@ -2828,13 -2843,17 +2846,13 @@@ P:   Paul Mund
  M:    lethal@linux-sh.org
  L:    linuxsh-dev@lists.sourceforge.net (subscribers-only)
  W:    http://www.linux-sh.org
 -W:    http://www.m17n.org/linux-sh/
  S:    Maintained
  
  SUPERH64 (sh64)
  P:    Paul Mundt
  M:    lethal@linux-sh.org
 -P:    Richard Curnow
 -M:    rc@rc0.org.uk
  L:    linuxsh-shmedia-dev@lists.sourceforge.net
  W:    http://www.linux-sh.org
 -W:    http://www.rc0.org.uk/sh64
  S:    Maintained
  
  SUN3/3X
@@@ -2869,11 -2888,6 +2887,11 @@@ M:    hlhung3i@gmail.co
  W:    http://tcp-lp-mod.sourceforge.net/
  S:    Maintained
  
 +TI FLASH MEDIA INTERFACE DRIVER
 +P:      Alex Dubov
 +M:      oakad@yahoo.com
 +S:      Maintained
 +
  TI OMAP RANDOM NUMBER GENERATOR SUPPORT
  P:    Deepak Saxena
  M:    dsaxena@plexity.net
@@@ -3397,6 -3411,12 +3415,6 @@@ M:     Henk.Vergonet@gmail.co
  L:    usbb2k-api-dev@nongnu.org
  S:    Maintained
  
 -YMFPCI YAMAHA PCI SOUND (Use ALSA instead)
 -P:    Pete Zaitcev
 -M:    zaitcev@yahoo.com
 -L:    linux-kernel@vger.kernel.org
 -S:    Obsolete
 -
  Z8530 DRIVER FOR AX.25
  P:    Joerg Reuter
  M:    jreuter@yaina.de
diff --combined fs/Kconfig
@@@ -74,11 -74,11 +74,11 @@@ config EXT3_F
        tristate "Ext3 journalling file system support"
        select JBD
        help
 -        This is the journaling version of the Second extended file system
 +        This is the journalling version of the Second extended file system
          (often called ext3), the de facto standard Linux file system
          (method to organize files on a storage device) for hard disks.
  
 -        The journaling code included in this driver means you do not have
 +        The journalling code included in this driver means you do not have
          to run e2fsck (file system checker) on your file systems after a
          crash.  The journal keeps track of any changes that were being made
          at the time the system crashed, and can ensure that your file system
@@@ -143,7 -143,7 +143,7 @@@ config EXT3_FS_SECURIT
  config JBD
        tristate
        help
 -        This is a generic journaling layer for block devices.  It is
 +        This is a generic journalling layer for block devices.  It is
          currently used by the ext3 and OCFS2 file systems, but it could
          also be used to add journal support to other file systems or block
          devices such as RAID or LVM.
@@@ -183,7 -183,7 +183,7 @@@ config REISERFS_F
        tristate "Reiserfs support"
        help
          Stores not just filenames but the files themselves in a balanced
 -        tree.  Uses journaling.
 +        tree.  Uses journalling.
  
          Balanced trees are more efficient than traditional file system
          architectural foundations.
@@@ -325,6 -325,7 +325,7 @@@ config FS_POSIX_AC
        default n
  
  source "fs/xfs/Kconfig"
+ source "fs/gfs2/Kconfig"
  
  config OCFS2_FS
        tristate "OCFS2 file system support"
@@@ -995,18 -996,6 +996,18 @@@ config AFFS_F
          To compile this file system support as a module, choose M here: the
          module will be called affs.  If unsure, say N.
  
 +config ECRYPT_FS
 +      tristate "eCrypt filesystem layer support (EXPERIMENTAL)"
 +      depends on EXPERIMENTAL && KEYS && CRYPTO
 +      help
 +        Encrypted filesystem that operates on the VFS layer.  See
 +        <file:Documentation/ecryptfs.txt> to learn more about
 +        eCryptfs.  Userspace components are required and can be
 +        obtained from <http://ecryptfs.sf.net>.
 +
 +        To compile this file system support as a module, choose M here: the
 +        module will be called ecryptfs.
 +
  config HFS_FS
        tristate "Apple Macintosh file system support (EXPERIMENTAL)"
        depends on BLOCK && EXPERIMENTAL
@@@ -1044,7 -1033,7 +1045,7 @@@ config BEFS_F
          on files and directories, and database-like indeces on selected
          attributes. (Also note that this driver doesn't make those features
          available at this time). It is a 64 bit filesystem, so it supports
 -        extremly large volumes and files.
 +        extremely large volumes and files.
  
          If you use this filesystem, you should also say Y to at least one
          of the NLS (native language support) options below.
@@@ -1102,7 -1091,7 +1103,7 @@@ config JFFS_F
        tristate "Journalling Flash File System (JFFS) support"
        depends on MTD && BLOCK
        help
 -        JFFS is the Journaling Flash File System developed by Axis
 +        JFFS is the Journalling Flash File System developed by Axis
          Communications in Sweden, aimed at providing a crash/powerdown-safe
          file system for disk-less embedded devices. Further information is
          available at (<http://developer.axis.com/software/jffs/>).
@@@ -1272,7 -1261,7 +1273,7 @@@ config JFFS2_CMODE_NON
  config JFFS2_CMODE_PRIORITY
          bool "priority"
          help
 -          Tries the compressors in a predefinied order and chooses the first
 +          Tries the compressors in a predefined order and chooses the first
            successful one.
  
  config JFFS2_CMODE_SIZE
@@@ -1377,7 -1366,7 +1378,7 @@@ config SYSV_F
  
          If you have floppies or hard disk partitions like that, it is likely
          that they contain binaries from those other Unix systems; in order
 -        to run these binaries, you will want to install linux-abi which is a
 +        to run these binaries, you will want to install linux-abi which is
          a set of kernel modules that lets you run SCO, Xenix, Wyse,
          UnixWare, Dell Unix and System V programs under Linux.  It is
          available via FTP (user: ftp) from
@@@ -1962,7 -1951,7 +1963,7 @@@ config AFS_F
          If you say Y here, you will get an experimental Andrew File System
          driver. It currently only supports unsecured read-only AFS access.
  
 -        See <file:Documentation/filesystems/afs.txt> for more intormation.
 +        See <file:Documentation/filesystems/afs.txt> for more information.
  
          If unsure, say N.
  
@@@ -1995,6 -1984,7 +1996,7 @@@ endmen
  endif
  
  source "fs/nls/Kconfig"
+ source "fs/dlm/Kconfig"
  
  endmenu
  
diff --combined fs/Makefile
@@@ -57,6 -57,7 +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/
@@@ -75,7 -76,6 +76,7 @@@ obj-$(CONFIG_BFS_FS)          += bfs
  obj-$(CONFIG_ISO9660_FS)      += isofs/
  obj-$(CONFIG_HFSPLUS_FS)      += hfsplus/ # Before hfs to find wrapped HFS+
  obj-$(CONFIG_HFS_FS)          += hfs/
 +obj-$(CONFIG_ECRYPT_FS)               += ecryptfs/
  obj-$(CONFIG_VXFS_FS)         += freevxfs/
  obj-$(CONFIG_NFS_FS)          += nfs/
  obj-$(CONFIG_EXPORTFS)                += exportfs/
@@@ -110,3 -110,4 +111,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,6 -46,7 +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
@@@ -104,6 -105,7 +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
@@@ -156,10 -158,12 +158,10 @@@ header-y += toshiba.
  header-y += ultrasound.h
  header-y += un.h
  header-y += utime.h
 -header-y += utsname.h
  header-y += video_decoder.h
  header-y += video_encoder.h
  header-y += videotext.h
  header-y += vt.h
 -header-y += wavefront.h
  header-y += wireless.h
  header-y += xattr.h
  header-y += x25.h
@@@ -192,6 -196,7 +194,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
@@@ -208,6 -213,7 +211,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
@@@ -331,7 -337,6 +335,7 @@@ unifdef-y += unistd.
  unifdef-y += usb_ch9.h
  unifdef-y += usbdevice_fs.h
  unifdef-y += user.h
 +unifdef-y += utsname.h
  unifdef-y += videodev2.h
  unifdef-y += videodev.h
  unifdef-y += wait.h
diff --combined include/linux/fs.h
@@@ -250,6 -250,8 +250,8 @@@ extern int dir_notify_enable
  #define FS_NOTAIL_FL                  0x00008000 /* file tail should not be merged */
  #define FS_DIRSYNC_FL                 0x00010000 /* dirsync behaviour (directories only) */
  #define FS_TOPDIR_FL                  0x00020000 /* Top of directory hierarchies*/
+ #define FS_EXTENT_FL                  0x00080000 /* Extents */
+ #define FS_DIRECTIO_FL                        0x00100000 /* Use direct i/o */
  #define FS_RESERVED_FL                        0x80000000 /* reserved for ext2 lib */
  
  #define FS_FL_USER_VISIBLE            0x0003DFFF /* User visible flags */
@@@ -684,8 -686,7 +686,8 @@@ extern struct block_device *I_BDEV(stru
  
  struct fown_struct {
        rwlock_t lock;          /* protects pid, uid, euid fields */
 -      int pid;                /* pid or -pgrp where SIGIO should be sent */
 +      struct pid *pid;        /* pid or -pgrp where SIGIO should be sent */
 +      enum pid_type pid_type; /* Kind of process group SIGIO should be sent to */
        uid_t uid, euid;        /* uid/euid of process setting the owner */
        int signum;             /* posix.1b rt signal to be delivered on IO */
  };
@@@ -881,10 -882,8 +883,10 @@@ extern void kill_fasync(struct fasync_s
  /* only for net: no internal synchronization */
  extern void __kill_fasync(struct fasync_struct *, int, int);
  
 +extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
  extern int f_setown(struct file *filp, unsigned long arg, int force);
  extern void f_delown(struct file *filp);
 +extern pid_t f_getown(struct file *filp);
  extern int send_sigurg(struct fown_struct *fown);
  
  /*
@@@ -1049,7 -1048,7 +1051,7 @@@ int generic_osync_inode(struct inode *
   * This allows the kernel to read directories into kernel space or
   * to have different dirent layouts depending on the binary type.
   */
 -typedef int (*filldir_t)(void *, const char *, int, loff_t, ino_t, unsigned);
 +typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned);
  
  struct block_device_operations {
        int (*open) (struct inode *, struct file *);
@@@ -1523,9 -1522,6 +1525,9 @@@ extern const struct file_operations def
  #ifdef CONFIG_BLOCK
  extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long);
  extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long);
 +extern int blkdev_driver_ioctl(struct inode *inode, struct file *file,
 +                             struct gendisk *disk, unsigned cmd,
 +                             unsigned long arg);
  extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long);
  extern int blkdev_get(struct block_device *, mode_t, unsigned);
  extern int blkdev_put(struct block_device *);
diff --combined mm/filemap.c
@@@ -1139,11 -1139,11 +1139,11 @@@ success
  }
  
  /**
 - * __generic_file_aio_read - generic filesystem read routine
 + * generic_file_aio_read - generic filesystem read routine
   * @iocb:     kernel I/O control block
   * @iov:      io vector request
   * @nr_segs:  number of segments in the iovec
 - * @ppos:     current file position
 + * @pos:      current file position
   *
   * This is the "read()" routine for all filesystems
   * that can use the page cache directly.
@@@ -1198,8 -1198,10 +1198,10 @@@ generic_file_aio_read(struct kiocb *ioc
                        if (retval > 0)
                                *ppos = pos + retval;
                }
-               file_accessed(filp);
-               goto out;
+               if (likely(retval != 0)) {
+                       file_accessed(filp);
+                       goto out;
+               }
        }
  
        retval = 0;