1. 26 10月, 2010 12 次提交
    • D
      affs: testing the wrong variable · 0e45b67d
      Dan Carpenter 提交于
      The intent was to verify that bh = affs_bread_ino(...) returned a valid
      pointer.  We checked "ext_bh" earlier in the function and it's valid
      here.
      Signed-off-by: NDan Carpenter <error27@gmail.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      0e45b67d
    • E
      fs: allow for more than 2^31 files · 7e360c38
      Eric Dumazet 提交于
      Andrew,
      
      Could you please review this patch, you probably are the right guy to
      take it, because it crosses fs and net trees.
      
      Note : /proc/sys/fs/file-nr is a read-only file, so this patch doesnt
      depend on previous patch (sysctl: fix min/max handling in
      __do_proc_doulongvec_minmax())
      
      Thanks !
      
      [PATCH V4] fs: allow for more than 2^31 files
      
      Robin Holt tried to boot a 16TB system and found af_unix was overflowing
      a 32bit value :
      
      <quote>
      
      We were seeing a failure which prevented boot.  The kernel was incapable
      of creating either a named pipe or unix domain socket.  This comes down
      to a common kernel function called unix_create1() which does:
      
              atomic_inc(&unix_nr_socks);
              if (atomic_read(&unix_nr_socks) > 2 * get_max_files())
                      goto out;
      
      The function get_max_files() is a simple return of files_stat.max_files.
      files_stat.max_files is a signed integer and is computed in
      fs/file_table.c's files_init().
      
              n = (mempages * (PAGE_SIZE / 1024)) / 10;
              files_stat.max_files = n;
      
      In our case, mempages (total_ram_pages) is approx 3,758,096,384
      (0xe0000000).  That leaves max_files at approximately 1,503,238,553.
      This causes 2 * get_max_files() to integer overflow.
      
      </quote>
      
      Fix is to let /proc/sys/fs/file-nr & /proc/sys/fs/file-max use long
      integers, and change af_unix to use an atomic_long_t instead of
      atomic_t.
      
      get_max_files() is changed to return an unsigned long.
      get_nr_files() is changed to return a long.
      
      unix_nr_socks is changed from atomic_t to atomic_long_t, while not
      strictly needed to address Robin problem.
      
      Before patch (on a 64bit kernel) :
      # echo 2147483648 >/proc/sys/fs/file-max
      # cat /proc/sys/fs/file-max
      -18446744071562067968
      
      After patch:
      # echo 2147483648 >/proc/sys/fs/file-max
      # cat /proc/sys/fs/file-max
      2147483648
      # cat /proc/sys/fs/file-nr
      704     0       2147483648
      Reported-by: NRobin Holt <holt@sgi.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Acked-by: NDavid Miller <davem@davemloft.net>
      Reviewed-by: NRobin Holt <holt@sgi.com>
      Tested-by: NRobin Holt <holt@sgi.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      7e360c38
    • J
      isofs: Fix isofs_get_blocks for 8TB files · fde214d4
      Jan Kara 提交于
      Currently isofs_get_blocks() was limited to handle only 4TB files on 32-bit
      architectures because of unnecessary use of iblock variable which was signed
      long. Just remove the variable. The error messages that were using this
      variable should have rather used b_off anyway because that is the block we
      are currently mapping.
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      fde214d4
    • C
      fs: kill block_prepare_write · ebdec241
      Christoph Hellwig 提交于
      __block_write_begin and block_prepare_write are identical except for slightly
      different calling conventions.  Convert all callers to the __block_write_begin
      calling conventions and drop block_prepare_write.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      ebdec241
    • C
      fs: mark destroy_inode static · 56b0dacf
      Christoph Hellwig 提交于
      Hugetlbfs used to need it, but after the destroy_inode and evict_inode
      changes it's not required anymore.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      56b0dacf
    • C
      fs: add sync_inode_metadata · c3765016
      Christoph Hellwig 提交于
      Add a new helper to write out the inode using the writeback code,
      that is including the correct dirty bit and list manipulation.  A few
      of filesystems already opencode this, and a lot of others should be
      using it instead of using write_inode_now which also writes out the
      data.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      c3765016
    • C
      fs: move permission check back into __lookup_hash · 81fca444
      Christoph Hellwig 提交于
      The caller that didn't need it is gone.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      81fca444
    • L
      Merge branch 'davinci-for-linus' of... · 72e58063
      Linus Torvalds 提交于
      Merge branch 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci
      
      * 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci: (50 commits)
        davinci: fix remaining board support after io_pgoffst removal
        davinci: mityomapl138: make file local data static
        arm/davinci: remove duplicated include
        davinci: Initial support for Omapl138-Hawkboard
        davinci: MityDSP-L138/MityARM-1808 read MAC address from I2C Prom
        davinci: add tnetv107x touchscreen platform device
        input: add driver for tnetv107x touchscreen controller
        davinci: add keypad config for tnetv107x evm board
        davinci: add tnetv107x keypad platform device
        input: add driver for tnetv107x on-chip keypad controller
        net: davinci_emac: cleanup unused cpdma code
        net: davinci_emac: switch to new cpdma layer
        net: davinci_emac: separate out cpdma code
        net: davinci_emac: cleanup unused mdio emac code
        omap: cleanup unused davinci mdio arch code
        davinci: cleanup mdio arch code and switch to phy_id
        net: davinci_emac: switch to new mdio
        omap: add mdio platform devices
        davinci: add mdio platform devices
        net: davinci_emac: separate out davinci mdio
        ...
      
      Fix up trivial conflict in drivers/input/keyboard/Kconfig (two entries
      added next to each other - one from the davinci merge, one from the
      input merge)
      72e58063
    • L
      Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd · 57c155d5
      Linus Torvalds 提交于
      * 'for-linus' of git://git.open-osd.org/linux-open-osd:
        exofs: Remove inode->i_count manipulation in exofs_new_inode
        fs/exofs: typo fix of faild to failed
        exofs: Set i_mapping->backing_dev_info anyway
        exofs: Cleaup read path in regard with read_for_write
      57c155d5
    • B
      x86-32, mm: Remove duplicated include · 9afd281a
      Borislav Petkov 提交于
      Commit b40827fa ("x86-32, mm: Add an initial page table for core
      bootstrapping") added an include directive which is needless and is
      taken care of by a previous one.  Remove it.
      Caught-by: NJaswinder Singh Rajput <jaswinderlinux@gmail.com>
      Signed-off-by: NBorislav Petkov <bp@alien8.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9afd281a
    • B
      exofs: Remove inode->i_count manipulation in exofs_new_inode · fe2fd9ed
      Boaz Harrosh 提交于
      exofs_new_inode() was incrementing the inode->i_count and
      decrementing it in create_done(), in a bad attempt to make sure
      the inode will still be there when the asynchronous create_done()
      finally arrives. This was very stupid because iput() was not called,
      and if it was actually needed, it would leak the inode.
      
      However all this is not needed, because at exofs_evict_inode()
      we already wait for create_done() by waiting for the
      object_created event. Therefore remove the superfluous ref counting
      and just Thicken the comment at exofs_evict_inode() a bit.
      
      While at it change places that open coded wait_obj_created()
      to call the already available wrapper.
      
      CC: Dave Chinner <dchinner@redhat.com>
      CC: Christoph Hellwig <hch@lst.de>
      CC: Nick Piggin <npiggin@kernel.dk>
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      fe2fd9ed
    • J
      fs/exofs: typo fix of faild to failed · 571f7f46
      Joe Perches 提交于
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      571f7f46
  2. 25 10月, 2010 28 次提交