1. 10 1月, 2011 1 次提交
  2. 07 1月, 2011 2 次提交
  3. 07 12月, 2010 1 次提交
  4. 10 11月, 2010 1 次提交
  5. 06 11月, 2010 1 次提交
  6. 05 11月, 2010 1 次提交
    • J
      cifs: dereferencing first then checking · d3892294
      Jeff Layton 提交于
      This patch is based on Dan's original patch. His original description is
      below:
      
      Smatch complained about a couple checking for NULL after dereferencing
      bugs.  I'm not super familiar with the code so I did the conservative
      thing and move the dereferences after the checks.
      
      The dereferences in cifs_lock() and cifs_fsync() were added in
      ba00ba64 "cifs: make various routines use the cifsFileInfo->tcon
      pointer".  The dereference in find_writable_file() was added in
      6508d904 "cifs: have find_readable/writable_file filter by fsuid".
      The comments there say it's possible to trigger the NULL dereference
      under stress.
      Signed-off-by: NDan Carpenter <error27@gmail.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      d3892294
  7. 03 11月, 2010 2 次提交
  8. 02 11月, 2010 1 次提交
    • J
      FS: cifs, remove unneeded NULL tests · 50ae28f0
      Jiri Slaby 提交于
      Stanse found that pSMBFile in cifs_ioctl and file->f_path.dentry in
      cifs_user_write are dereferenced prior their test to NULL.
      
      The alternative is not to dereference them before the tests. The patch is
      to point out the problem, you have to decide.
      
      While at it we cache the inode in cifs_user_write to a local variable
      and use all over the function.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Steve French <sfrench@samba.org>
      Cc: linux-cifs@vger.kernel.org
      Cc: Jeff Layton <jlayton@redhat.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      50ae28f0
  9. 28 10月, 2010 1 次提交
  10. 27 10月, 2010 1 次提交
    • W
      writeback: remove nonblocking/encountered_congestion references · 1b430bee
      Wu Fengguang 提交于
      This removes more dead code that was somehow missed by commit 0d99519e
      (writeback: remove unused nonblocking and congestion checks).  There are
      no behavior change except for the removal of two entries from one of the
      ext4 tracing interface.
      
      The nonblocking checks in ->writepages are no longer used because the
      flusher now prefer to block on get_request_wait() than to skip inodes on
      IO congestion.  The latter will lead to more seeky IO.
      
      The nonblocking checks in ->writepage are no longer used because it's
      redundant with the WB_SYNC_NONE check.
      
      We no long set ->nonblocking in VM page out and page migration, because
      a) it's effectively redundant with WB_SYNC_NONE in current code
      b) it's old semantic of "Don't get stuck on request queues" is mis-behavior:
         that would skip some dirty inodes on congestion and page out others, which
         is unfair in terms of LRU age.
      
      Inspired by Christoph Hellwig. Thanks!
      Signed-off-by: NWu Fengguang <fengguang.wu@intel.com>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Sage Weil <sage@newdream.net>
      Cc: Steve French <sfrench@samba.org>
      Cc: Chris Mason <chris.mason@oracle.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1b430bee
  11. 25 10月, 2010 4 次提交
  12. 22 10月, 2010 1 次提交
  13. 18 10月, 2010 9 次提交
  14. 16 10月, 2010 1 次提交
  15. 13 10月, 2010 2 次提交
    • J
      cifs: don't use vfsmount to pin superblock for oplock breaks · d7c86ff8
      Jeff Layton 提交于
      Filesystems aren't really supposed to do anything with a vfsmount. It's
      considered a layering violation since vfsmounts are entirely managed at
      the VFS layer.
      
      CIFS currently keeps an active reference to a vfsmount in order to
      prevent the superblock vanishing before an oplock break has completed.
      What we really want to do instead is to keep sb->s_active high until the
      oplock break has completed. This patch borrows the scheme that NFS uses
      for handling sillyrenames.
      
      An atomic_t is added to the cifs_sb_info. When it transitions from 0 to
      1, an extra reference to the superblock is taken (by bumping the
      s_active value). When it transitions from 1 to 0, that reference is
      dropped and a the superblock teardown may proceed if there are no more
      references to it.
      
      Also, the vfsmount pointer is removed from cifsFileInfo and from
      cifs_new_fileinfo, and some bogus forward declarations are removed from
      cifsfs.h.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Reviewed-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Acked-by: NDave Kleikamp <shaggy@linux.vnet.ibm.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      d7c86ff8
    • J
      cifs: keep dentry reference in cifsFileInfo instead of inode reference · a5e18bc3
      Jeff Layton 提交于
      cifsFileInfo is a bit problematic. It contains a reference back to the
      struct file itself. This makes it difficult for a cifsFileInfo to exist
      without a corresponding struct file.
      
      It would be better instead of the cifsFileInfo just held info pertaining
      to the open file on the server instead without any back refrences to the
      struct file. This would allow it to exist after the filp to which it was
      originally attached was closed.
      
      Much of the use of the file pointer in this struct is to get at the
      dentry.  Begin divorcing the cifsFileInfo from the struct file by
      keeping a reference to the dentry. Since the dentry will have a
      reference to the inode, we can eliminate the "pInode" field too and
      convert the igrab/iput to dget/dput.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Reviewed-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Acked-by: NDave Kleikamp <shaggy@linux.vnet.ibm.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      a5e18bc3
  16. 07 10月, 2010 3 次提交
  17. 30 9月, 2010 6 次提交
  18. 17 8月, 2010 1 次提交
  19. 02 8月, 2010 1 次提交