1. 13 Jul, 2005 1 commit
    • Linus Torvalds's avatar
      reiserfs: run scripts/Lindent on reiserfs code · bd4c625c
      Linus Torvalds authored
      This was a pure indentation change, using:
      	scripts/Lindent fs/reiserfs/*.c include/linux/reiserfs_*.h
      to make reiserfs match the regular Linux indentation style.  As Jeff
      Mahoney <jeffm@suse.com> writes:
       The ReiserFS code is a mix of a number of different coding styles, sometimes
       different even from line-to-line. Since the code has been relatively stable
       for quite some time and there are few outstanding patches to be applied, it
       is time to reformat the code to conform to the Linux style standard outlined
       in Documentation/CodingStyle.
       This patch contains the result of running scripts/Lindent against
       fs/reiserfs/*.c and include/linux/reiserfs_*.h. There are places where the
       code can be made to look better, but I'd rather keep those patches separate
       so that there isn't a subtle by-hand hand accident in the middle of a huge
       patch. To be clear: This patch is reformatting *only*.
       A number of patches may follow that continue to make the code more consistent
       with the Linux coding style.
       Hans wasn't particularly enthusiastic about these patches, but said he
       wouldn't really oppose them either.
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  2. 12 Jul, 2005 7 commits
    • Jeff Mahoney's avatar
      [PATCH] reiserfs: fix up case where indent misreads the code · 7fa94c88
      Jeff Mahoney authored
       indent(1) doesn't know how to handle the "do not compile" error. It results
       in the item_ops array declaration being indented a tab stop in when it should
       not be. This patch replaces it with a #error that describes why it's failing.
      Signed-off-by: default avatarJeff Mahoney <jeffm@suse.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • Brian King's avatar
      [PATCH] cdev: cdev_put oops · 7da6844c
      Brian King authored
      While fixing an oops in the st driver in a dirty release path, I
      encountered an oops in cdev_put for cdevs allocated using cdev_alloc.  If
      cdev_del is called when the cdev kobject still has an open user, when the
      last cdev_put is called, the cdev_put will call kobject_put, which will end
      up ultimately releasing the cdev in cdev_dynamic_release.  Patch fixes the
      oops by preventing cdev_put from accessing freed memory.
      Signed-off-by: default avatarBrian King <brking@us.ibm.com>
      Cc: <viro@parcelfarce.linux.theplanet.co.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • Jan Kara's avatar
      [PATCH] ext2: fix mount options parting · 50a52234
      Jan Kara authored
      Restore old set of ext2 mount options when remounting of a filesystem
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • Jan Kara's avatar
      [PATCH] ext3: fix options parsing · 08c6a96f
      Jan Kara authored
      Fix a problem with ext3 mount option parsing.  When remount of a filesystem
      fails, old options are now restored.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • Roland McGrath's avatar
      [PATCH] reset real_timer target on exec leader change · 53231250
      Roland McGrath authored
      When a noninitial thread does exec, it becomes the new group leader.  If
      there is a ITIMER_REAL timer running, it points at the old group leader and
      when it fires it can follow a stale pointer.  The timer data needs to be
      reset to point at the exec'ing thread that is becoming the group leader.
      This has to synchronize with any concurrent firing of the timer to make
      sure that it_real_fn can never run when the data points to a thread that
      might have been reaped already.
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • Artem B. Bityuckiy's avatar
      [PATCH] bugfix: two read_inode() calls without clear_inode() call between · 4120db47
      Artem B. Bityuckiy authored
      Bug symptoms
      For the same inode VFS calls read_inode() twice and doesn't call
      clear_inode() between the two read_inode() invocations.
      Bug description
      Suppose we have an inode which has zero reference count but is still in
      the inode cache. Suppose kswapd invokes shrink_icache_memory() to free
      some RAM. In prune_icache() inodes are removed from i_hash. prune_icache
      () is then going to call clear_inode(), but drops the inode_lock
      spinlock before this. If in this moment another task calls iget() for an
      inode which was just removed from i_hash by prune_icache(), then iget()
      invokes read_inode() for this inode, because it is *already removed*
      from i_hash.
      The end result is: we call iget(#N) then iput(#N); inode #N has zero
      i_count now and is in the inode cache; kswapd starts. kswapd removes the
      inode #N from i_hash ans is preempted; we call iget(#N) again;
      read_inode() is invoked as the result; but we expect clear_inode()
      To fix the bug I remove inodes from i_hash later, when clear_inode() is
      actually called. I remove them from i_hash under spinlock protection.
      Since the i_state is set to I_FREEING, it is safe to do this. The others
      will sleep waiting for the inode state change.
      I also postpone removing inodes from i_sb_list. It is not compulsory to
      do so but I do it for readability reasons. Inodes are added/removed to
      the lists together everywhere in the code and there is no point to
      change this rule. This is harmless because the only user of i_sb_list
      which somehow may interfere with me (invalidate_list()) is excluded by
      the iprune_sem mutex.
      The same race is possible in invalidate_list() so I do the same for it.
      Acked-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • Miklos Szeredi's avatar
      [PATCH] __wait_on_freeing_inode fix · 168a9fd6
      Miklos Szeredi authored
      This patch fixes queer behavior in __wait_on_freeing_inode().
      If I_LOCK was not set it called yield(), effectively busy waiting for the
      removal of the inode from the hash.  This change was introduced within
      "[PATCH] eliminate inode waitqueue hashtable" Changeset 1.1938.166.16 last
      october by wli.
      The solution is to restore the old behavior, of unconditionally waiting on
      the waitqueue.  It doesn't matter if I_LOCK is not set initally, the task
      will go to sleep, and wake up when wake_up_inode() is called from
      generic_delete_inode() after removing the inode from the hash chain.
      Comment is also updated to better reflect current behavior.
      This condition is very hard to trigger normally (simultaneous clear_inode()
      with iget()) so probably only heavy stress testing can reveal any change of
      Signed-off-by: default avatarMiklos Szeredi <miklos@szeredi.hu>
      Acked-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  3. 08 Jul, 2005 32 commits