1. 29 6月, 2013 2 次提交
  2. 06 6月, 2013 2 次提交
    • J
      jfs: Update jfs_error · eb8630d7
      Joe Perches 提交于
      Use a more current logging style.
      
      Add __printf format and argument verification.
      
      Remove embedded function names from formats.
      Add %pf, __builtin_return_address(0) to jfs_error.
      Add newlines to formats for kernel style consistency.
      (One format already had an erroneous newline)
      Coalesce formats and align arguments.
      
      Object size reduced ~1KiB.
      
      $ size fs/jfs/built-in.o*
         text	   data	    bss	    dec	    hex	filename
       201891	  35488	  63936	 301315	  49903	fs/jfs/built-in.o.new
       202821	  35488	  64192	 302501	  49da5	fs/jfs/built-in.o.old
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDave Kleikamp <dave.kleikamp@oracle.com>
      eb8630d7
    • D
      jfs: fix sparse warning in fs/jfs/xattr.c · 21d1101f
      Dave Kleikamp 提交于
        CHECK   fs/jfs/xattr.c
      fs/jfs/xattr.c:1092:5: warning: symbol 'jfs_initxattrs' was not declared. Should it be static?
      Signed-off-by: NDave Kleikamp <dave.kleikamp@oracle.com>
      21d1101f
  3. 25 5月, 2013 2 次提交
  4. 22 5月, 2013 1 次提交
    • L
      mm: change invalidatepage prototype to accept length · d47992f8
      Lukas Czerner 提交于
      Currently there is no way to truncate partial page where the end
      truncate point is not at the end of the page. This is because it was not
      needed and the functionality was enough for file system truncate
      operation to work properly. However more file systems now support punch
      hole feature and it can benefit from mm supporting truncating page just
      up to the certain point.
      
      Specifically, with this functionality truncate_inode_pages_range() can
      be changed so it supports truncating partial page at the end of the
      range (currently it will BUG_ON() if 'end' is not at the end of the
      page).
      
      This commit changes the invalidatepage() address space operation
      prototype to accept range to be invalidated and update all the instances
      for it.
      
      We also change the block_invalidatepage() in the same way and actually
      make a use of the new length argument implementing range invalidation.
      
      Actual file system implementations will follow except the file systems
      where the changes are really simple and should not change the behaviour
      in any way .Implementation for truncate_page_range() which will be able
      to accept page unaligned ranges will follow as well.
      Signed-off-by: NLukas Czerner <lczerner@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Hugh Dickins <hughd@google.com>
      d47992f8
  5. 08 5月, 2013 1 次提交
  6. 02 5月, 2013 1 次提交
    • D
      jfs: fix a couple races · 73aaa22d
      Dave Kleikamp 提交于
      This patch fixes races uncovered by xfstests testcase 068.
      
      One race is the result of jfs_sync() trying to write a sync point to the
      journal after it has been frozen (or possibly in the process). Since
      freezing sync's the journal, there is no need to write a sync point so
      we simply want to return.
      
      The second involves jfs_write_inode() being called on a deleted inode.
      It calls jfs_flush_journal which is held up by the jfs_commit thread
      doing the final iput on the same deleted inode, which itself is
      waiting for the I_SYNC flag to be cleared. jfs_write_inode need not
      do anything when i_nlink is zero, which is the easy fix.
      Reported-by: NMichael L. Semon <mlsemon35@gmail.com>
      Signed-off-by: NDave Kleikamp <dave.kleikamp@oracle.com>
      73aaa22d
  7. 24 3月, 2013 1 次提交
    • K
      block: Remove bi_idx references · 4f2ac93c
      Kent Overstreet 提交于
      For immutable bvecs, all bi_idx usage needs to be audited - so here
      we're removing all the unnecessary uses.
      
      Most of these are places where it was being initialized on a bio that
      was just allocated, a few others are conversions to standard macros.
      Signed-off-by: NKent Overstreet <koverstreet@google.com>
      CC: Jens Axboe <axboe@kernel.dk>
      4f2ac93c
  8. 04 3月, 2013 1 次提交
    • E
      fs: Limit sys_mount to only request filesystem modules. · 7f78e035
      Eric W. Biederman 提交于
      Modify the request_module to prefix the file system type with "fs-"
      and add aliases to all of the filesystems that can be built as modules
      to match.
      
      A common practice is to build all of the kernel code and leave code
      that is not commonly needed as modules, with the result that many
      users are exposed to any bug anywhere in the kernel.
      
      Looking for filesystems with a fs- prefix limits the pool of possible
      modules that can be loaded by mount to just filesystems trivially
      making things safer with no real cost.
      
      Using aliases means user space can control the policy of which
      filesystem modules are auto-loaded by editing /etc/modprobe.d/*.conf
      with blacklist and alias directives.  Allowing simple, safe,
      well understood work-arounds to known problematic software.
      
      This also addresses a rare but unfortunate problem where the filesystem
      name is not the same as it's module name and module auto-loading
      would not work.  While writing this patch I saw a handful of such
      cases.  The most significant being autofs that lives in the module
      autofs4.
      
      This is relevant to user namespaces because we can reach the request
      module in get_fs_type() without having any special permissions, and
      people get uncomfortable when a user specified string (in this case
      the filesystem type) goes all of the way to request_module.
      
      After having looked at this issue I don't think there is any
      particular reason to perform any filtering or permission checks beyond
      making it clear in the module request that we want a filesystem
      module.  The common pattern in the kernel is to call request_module()
      without regards to the users permissions.  In general all a filesystem
      module does once loaded is call register_filesystem() and go to sleep.
      Which means there is not much attack surface exposed by loading a
      filesytem module unless the filesystem is mounted.  In a user
      namespace filesystems are not mounted unless .fs_flags = FS_USERNS_MOUNT,
      which most filesystems do not set today.
      Acked-by: NSerge Hallyn <serge.hallyn@canonical.com>
      Acked-by: NKees Cook <keescook@chromium.org>
      Reported-by: NKees Cook <keescook@google.com>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      7f78e035
  9. 23 2月, 2013 1 次提交
  10. 17 1月, 2013 1 次提交
  11. 07 1月, 2013 1 次提交
  12. 21 12月, 2012 1 次提交
  13. 17 10月, 2012 1 次提交
  14. 03 10月, 2012 1 次提交
  15. 21 9月, 2012 1 次提交
  16. 19 9月, 2012 1 次提交
  17. 18 9月, 2012 3 次提交
  18. 23 7月, 2012 2 次提交
    • A
      don't expose I_NEW inodes via dentry->d_inode · 8fc37ec5
      Al Viro 提交于
      	d_instantiate(dentry, inode);
      	unlock_new_inode(inode);
      
      is a bad idea; do it the other way round...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      8fc37ec5
    • J
      quota: Move quota syncing to ->sync_fs method · a1177825
      Jan Kara 提交于
      Since the moment writes to quota files are using block device page cache and
      space for quota structures is reserved at the moment they are first accessed we
      have no reason to sync quota before inode writeback. In fact this order is now
      only harmful since quota information can easily change during inode writeback
      (either because conversion of delayed-allocated extents or simply because of
      allocation of new blocks for simple filesystems not using page_mkwrite).
      
      So move syncing of quota information after writeback of inodes into ->sync_fs
      method. This way we do not have to use ->quota_sync callback which is primarily
      intended for use by quotactl syscall anyway and we get rid of calling
      ->sync_fs() twice unnecessarily. We skip quota syncing for OCFS2 since it does
      proper quota journalling in all cases (unlike ext3, ext4, and reiserfs which
      also support legacy non-journalled quotas) and thus there are no dirty quota
      structures.
      
      CC: "Theodore Ts'o" <tytso@mit.edu>
      CC: Joel Becker <jlbec@evilplan.org>
      CC: reiserfs-devel@vger.kernel.org
      Acked-by: NSteven Whitehouse <swhiteho@redhat.com>
      Acked-by: NDave Kleikamp <shaggy@kernel.org>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      a1177825
  19. 14 7月, 2012 3 次提交
  20. 06 5月, 2012 1 次提交
  21. 21 3月, 2012 3 次提交
  22. 07 1月, 2012 1 次提交
  23. 04 1月, 2012 6 次提交
  24. 22 11月, 2011 1 次提交
    • T
      freezer: unexport refrigerator() and update try_to_freeze() slightly · a0acae0e
      Tejun Heo 提交于
      There is no reason to export two functions for entering the
      refrigerator.  Calling refrigerator() instead of try_to_freeze()
      doesn't save anything noticeable or removes any race condition.
      
      * Rename refrigerator() to __refrigerator() and make it return bool
        indicating whether it scheduled out for freezing.
      
      * Update try_to_freeze() to return bool and relay the return value of
        __refrigerator() if freezing().
      
      * Convert all refrigerator() users to try_to_freeze().
      
      * Update documentation accordingly.
      
      * While at it, add might_sleep() to try_to_freeze().
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Samuel Ortiz <samuel@sortiz.org>
      Cc: Chris Mason <chris.mason@oracle.com>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jan Kara <jack@suse.cz>
      Cc: KONISHI Ryusuke <konishi.ryusuke@lab.ntt.co.jp>
      Cc: Christoph Hellwig <hch@infradead.org>
      a0acae0e
  25. 02 11月, 2011 1 次提交