1. 13 7月, 2005 14 次提交
    • R
      [PATCH] inotify · 0eeca283
      Robert Love 提交于
      inotify is intended to correct the deficiencies of dnotify, particularly
      its inability to scale and its terrible user interface:
      
              * dnotify requires the opening of one fd per each directory
                that you intend to watch. This quickly results in too many
                open files and pins removable media, preventing unmount.
              * dnotify is directory-based. You only learn about changes to
                directories. Sure, a change to a file in a directory affects
                the directory, but you are then forced to keep a cache of
                stat structures.
              * dnotify's interface to user-space is awful.  Signals?
      
      inotify provides a more usable, simple, powerful solution to file change
      notification:
      
              * inotify's interface is a system call that returns a fd, not SIGIO.
      	  You get a single fd, which is select()-able.
              * inotify has an event that says "the filesystem that the item
                you were watching is on was unmounted."
              * inotify can watch directories or files.
      
      Inotify is currently used by Beagle (a desktop search infrastructure),
      Gamin (a FAM replacement), and other projects.
      
      See Documentation/filesystems/inotify.txt.
      Signed-off-by: NRobert Love <rml@novell.com>
      Cc: John McCutchan <ttb@tentacle.dhs.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0eeca283
    • L
      reiserfs: run scripts/Lindent on reiserfs code · bd4c625c
      Linus Torvalds 提交于
      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: NLinus Torvalds <torvalds@osdl.org>
      bd4c625c
    • J
      [PATCH] reiserfs: fix up case where indent misreads the code · 7fa94c88
      Jeff Mahoney 提交于
       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: NJeff Mahoney <jeffm@suse.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7fa94c88
    • B
      [PATCH] cdev: cdev_put oops · 7da6844c
      Brian King 提交于
      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: NBrian King <brking@us.ibm.com>
      Cc: <viro@parcelfarce.linux.theplanet.co.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7da6844c
    • 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
    • T
      751382dd
    • A
      [JFFS2] Init locks early during mount · b6220598
      Artem B. Bityuckiy 提交于
      In case of a mount error locks might be uninitialized but
      accessed by the resulting call to jffs2_kill_sb().
      Signed-off-by: NArtem B. Bityuckiy <dedekind@infradead.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      b6220598
    • A
      [JFFS2] Rename function and update comments · e4fef661
      Artem B. Bityuckiy 提交于
      We recently changed the method of collecting and sorting of
      tmp_dnode objects to use a temporary RB-tree instead of a
      temporary list. Rename function and update comments.
      Signed-off-by: NArtem B. Bityuckiy <dedekind@infradead.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      e4fef661
    • A
    • A
  2. 08 7月, 2005 26 次提交