1. 13 7月, 2005 5 次提交
    • J
      [PATCH] ext2: fix mount options parting · 50a52234
      Jan Kara 提交于
      Restore old set of ext2 mount options when remounting of a filesystem
      fails.
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      50a52234
    • J
      [PATCH] ext3: fix options parsing · 08c6a96f
      Jan Kara 提交于
      Fix a problem with ext3 mount option parsing.  When remount of a filesystem
      fails, old options are now restored.
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      08c6a96f
    • R
      [PATCH] reset real_timer target on exec leader change · 53231250
      Roland McGrath 提交于
      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: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      53231250
    • A
      [PATCH] bugfix: two read_inode() calls without clear_inode() call between · 4120db47
      Artem B. Bityuckiy 提交于
      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()
      before.
      
      Fix
      ~~~~~~~
      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: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4120db47
    • M
      [PATCH] __wait_on_freeing_inode fix · 168a9fd6
      Miklos Szeredi 提交于
      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
      behavior.
      Signed-off-by: NMiklos Szeredi <miklos@szeredi.hu>
      Acked-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      168a9fd6
  2. 08 7月, 2005 35 次提交