1. 16 3月, 2015 1 次提交
    • F
      udf: use int for allocated blocks instead of sector_t · 1be440de
      Fabian Frederick 提交于
      Fix the following warnings:
      
      fs/udf/balloc.c:768:15: warning: conversion to 'sector_t' from 'int'
      may change the sign of the result [-Wsign-conversion]
         allocated = udf_bitmap_prealloc_blocks(sb,
                     ^
      fs/udf/balloc.c:773:15: warning: conversion to 'sector_t' from 'int'
      may change the sign of the result [-Wsign-conversion]
         allocated = udf_table_prealloc_blocks(sb,
                     ^
      fs/udf/balloc.c:778:15: warning: conversion to 'sector_t' from 'int'
      may change the sign of the result [-Wsign-conversion]
         allocated = udf_bitmap_prealloc_blocks(sb,
                     ^
      fs/udf/balloc.c:783:15: warning: conversion to 'sector_t' from 'int'
      may change the sign of the result [-Wsign-conversion]
         allocated = udf_table_prealloc_blocks(sb,
                     ^
      fs/udf/balloc.c:791:26: warning: conversion to 'loff_t' from 'sector_t'
      may change the sign of the result [-Wsign-conversion]
         inode_add_bytes(inode, allocated << sb->s_blocksize_bits);
                                ^
      fs/udf/balloc.c:792:2: warning: conversion to 'int' from 'sector_t'
      may alter its value [-Wconversion]
        return allocated;
      Suggested-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NFabian Frederick <fabf@skynet.be>
      Signed-off-by: NJan Kara <jack@suse.cz>
      1be440de
  2. 14 3月, 2015 3 次提交
  3. 05 2月, 2015 2 次提交
  4. 28 1月, 2015 1 次提交
    • J
      udf: Release preallocation on last writeable close · b07ef352
      Jan Kara 提交于
      Commit 6fb1ca92 "udf: Fix race between write(2) and close(2)"
      changed the condition when preallocation is released. The idea was that
      we don't want to release the preallocation for an inode on close when
      there are other writeable file descriptors for the inode. However the
      condition was written in the opposite way so we released preallocation
      only if there were other writeable file descriptors. Fix the problem by
      changing the condition properly.
      
      CC: stable@vger.kernel.org
      Fixes: 6fb1ca92Reported-by: NFabian Frederick <fabf@skynet.be>
      Signed-off-by: NJan Kara <jack@suse.cz>
      b07ef352
  5. 12 1月, 2015 1 次提交
  6. 07 1月, 2015 2 次提交
  7. 05 1月, 2015 1 次提交
  8. 22 12月, 2014 2 次提交
  9. 19 12月, 2014 3 次提交
  10. 20 11月, 2014 2 次提交
  11. 09 10月, 2014 1 次提交
    • J
      udf: Fix loading of special inodes · 6174c2eb
      Jan Kara 提交于
      Some UDF media have special inodes (like VAT or metadata partition
      inodes) whose link_count is 0. Thus commit 4071b913 (udf: Properly
      detect stale inodes) broke loading these inodes because udf_iget()
      started returning -ESTALE for them. Since we still need to properly
      detect stale inodes queried by NFS, create two variants of udf_iget() -
      one which is used for looking up special inodes (which ignores
      link_count == 0) and one which is used for other cases which return
      ESTALE when link_count == 0.
      
      Fixes: 4071b913
      CC: stable@vger.kernel.org
      Signed-off-by: NJan Kara <jack@suse.cz>
      6174c2eb
  12. 29 9月, 2014 1 次提交
  13. 17 9月, 2014 1 次提交
    • J
      udf: Fix race between write(2) and close(2) · 6fb1ca92
      Jan Kara 提交于
      Currently write(2) updating i_size and close(2) of the file can race in
      such a way that udf_truncate_tail_extent() called from
      udf_file_release() sees old i_size but already new extents added by the
      running write call. This results in complaints like:
        UDF-fs: warning (device vdb2): udf_truncate_tail_extent: Too long extent
          after EOF in inode 877: i_size: 0 lbcount: 1073739776 extent 0+1073739776
        UDF-fs: error (device vdb2): udf_truncate_tail_extent: Extent after EOF
          in inode 877
      
      Fix the problem by grabbing i_mutex in udf_file_release() to be sure
      i_size is consistent with current state of extent list. Also avoid
      truncating tail extent unnecessarily when the file is still open for
      writing.
      Signed-off-by: NJan Kara <jack@suse.cz>
      6fb1ca92
  14. 05 9月, 2014 6 次提交
  15. 04 9月, 2014 3 次提交
  16. 20 8月, 2014 1 次提交
  17. 16 7月, 2014 3 次提交
  18. 07 5月, 2014 5 次提交
  19. 04 4月, 2014 1 次提交
    • J
      mm + fs: store shadow entries in page cache · 91b0abe3
      Johannes Weiner 提交于
      Reclaim will be leaving shadow entries in the page cache radix tree upon
      evicting the real page.  As those pages are found from the LRU, an
      iput() can lead to the inode being freed concurrently.  At this point,
      reclaim must no longer install shadow pages because the inode freeing
      code needs to ensure the page tree is really empty.
      
      Add an address_space flag, AS_EXITING, that the inode freeing code sets
      under the tree lock before doing the final truncate.  Reclaim will check
      for this flag before installing shadow pages.
      Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org>
      Reviewed-by: NRik van Riel <riel@redhat.com>
      Reviewed-by: NMinchan Kim <minchan@kernel.org>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Bob Liu <bob.liu@oracle.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Greg Thelen <gthelen@google.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Luigi Semenzato <semenzato@google.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Metin Doslu <metin@citusdata.com>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Ozgun Erdogan <ozgun@citusdata.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Roman Gushchin <klamm@yandex-team.ru>
      Cc: Ryan Mallon <rmallon@gmail.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      91b0abe3