1. 26 2月, 2008 4 次提交
  2. 22 2月, 2008 1 次提交
  3. 21 2月, 2008 2 次提交
    • H
      nfs: fix sparse warnings · 90dc7d27
      Harvey Harrison 提交于
      fs/nfs/nfs4state.c:788:34: warning: Using plain integer as NULL pointer
      fs/nfs/delegation.c:52:34: warning: Using plain integer as NULL pointer
      fs/nfs/idmap.c:312:12: warning: Using plain integer as NULL pointer
      fs/nfs/callback_xdr.c:257:6: warning: Using plain integer as NULL pointer
      fs/nfs/callback_xdr.c:270:6: warning: Using plain integer as NULL pointer
      fs/nfs/callback_xdr.c:281:6: warning: Using plain integer as NULL pointer
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      90dc7d27
    • J
      NFS: flush signals before taking down callback thread · 1227a74e
      Jeff Layton 提交于
      Now that the reference counting on the callback thread is working as
      expected, it uncovers another problem.  Peter Staubach noticed while
      testing that patch on an older kernel that he would occasionally see
      this printk in rpc_register fire:
      
          "RPC: failed to contact portmap (errno -512).
      
      The NFSv4 callback thread is signaled by nfs_callback_down(), but never
      flushes that signal. All of the shutdown processing is done with that
      signal pending. This makes it fail the call to unregister the port with
      the portmapper.
      
      In actuality, this rpc_register call isn't necessary at all since the
      port isn't actually registered with the portmapper anymore. Regardless,
      there doesn't seem to be any reason to leave the signal pending while
      the thread is being shut down and flushing it should generally silence
      that printk.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      1227a74e
  4. 15 2月, 2008 2 次提交
  5. 14 2月, 2008 4 次提交
  6. 08 2月, 2008 2 次提交
    • T
      NFS: Fix a potential file corruption issue when writing · 5d47a356
      Trond Myklebust 提交于
      If the inode is flagged as having an invalid mapping, then we can't rely on
      the PageUptodate() flag. Ensure that we don't use the "anti-fragmentation"
      write optimisation in nfs_updatepage(), since that will cause NFS to write
      out areas of the page that are no longer guaranteed to be up to date.
      
      A potential corruption could occur in the following scenario:
      
      client 1			client 2
      ===============			===============
      				fd=open("f",O_CREAT|O_WRONLY,0644);
      				write(fd,"fubar\n",6);	// cache last page
      				close(fd);
      fd=open("f",O_WRONLY|O_APPEND);
      write(fd,"foo\n",4);
      close(fd);
      
      				fd=open("f",O_WRONLY|O_APPEND);
      				write(fd,"bar\n",4);
      				close(fd);
      -----
      The bug may lead to the file "f" reading 'fubar\n\0\0\0\nbar\n' because
      client 2 does not update the cached page after re-opening the file for
      write. Instead it keeps it marked as PageUptodate() until someone calls
      invaldate_inode_pages2() (typically by calling read()).
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      5d47a356
    • D
      Convert ERR_PTR(PTR_ERR(p)) instances to ERR_CAST(p) · e231c2ee
      David Howells 提交于
      Convert instances of ERR_PTR(PTR_ERR(p)) to ERR_CAST(p) using:
      
      perl -spi -e 's/ERR_PTR[(]PTR_ERR[(](.*)[)][)]/ERR_CAST(\1)/' `grep -rl 'ERR_PTR[(]*PTR_ERR' fs crypto net security`
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e231c2ee
  7. 06 2月, 2008 1 次提交
    • C
      Pagecache zeroing: zero_user_segment, zero_user_segments and zero_user · eebd2aa3
      Christoph Lameter 提交于
      Simplify page cache zeroing of segments of pages through 3 functions
      
      zero_user_segments(page, start1, end1, start2, end2)
      
              Zeros two segments of the page. It takes the position where to
              start and end the zeroing which avoids length calculations and
      	makes code clearer.
      
      zero_user_segment(page, start, end)
      
              Same for a single segment.
      
      zero_user(page, start, length)
      
              Length variant for the case where we know the length.
      
      We remove the zero_user_page macro. Issues:
      
      1. Its a macro. Inline functions are preferable.
      
      2. The KM_USER0 macro is only defined for HIGHMEM.
      
         Having to treat this special case everywhere makes the
         code needlessly complex. The parameter for zeroing is always
         KM_USER0 except in one single case that we open code.
      
      Avoiding KM_USER0 makes a lot of code not having to be dealing
      with the special casing for HIGHMEM anymore. Dealing with
      kmap is only necessary for HIGHMEM configurations. In those
      configurations we use KM_USER0 like we do for a series of other
      functions defined in highmem.h.
      
      Since KM_USER0 is depends on HIGHMEM the existing zero_user_page
      function could not be a macro. zero_user_* functions introduced
      here can be be inline because that constant is not used when these
      functions are called.
      
      Also extract the flushing of the caches to be outside of the kmap.
      
      [akpm@linux-foundation.org: fix nfs and ntfs build]
      [akpm@linux-foundation.org: fix ntfs build some more]
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Michael Halcrow <mhalcrow@us.ibm.com>
      Cc: <linux-ext4@vger.kernel.org>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Cc: David Chinner <dgc@sgi.com>
      Cc: Michael Halcrow <mhalcrow@us.ibm.com>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      eebd2aa3
  8. 02 2月, 2008 1 次提交
  9. 30 1月, 2008 23 次提交