1. 14 11月, 2008 2 次提交
  2. 23 10月, 2008 1 次提交
  3. 19 4月, 2008 2 次提交
  4. 15 2月, 2008 2 次提交
  5. 02 11月, 2007 1 次提交
  6. 23 10月, 2007 1 次提交
  7. 22 5月, 2007 1 次提交
    • A
      Detach sched.h from mm.h · e8edc6e0
      Alexey Dobriyan 提交于
      First thing mm.h does is including sched.h solely for can_do_mlock() inline
      function which has "current" dereference inside. By dealing with can_do_mlock()
      mm.h can be detached from sched.h which is good. See below, why.
      
      This patch
      a) removes unconditional inclusion of sched.h from mm.h
      b) makes can_do_mlock() normal function in mm/mlock.c
      c) exports can_do_mlock() to not break compilation
      d) adds sched.h inclusions back to files that were getting it indirectly.
      e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
         getting them indirectly
      
      Net result is:
      a) mm.h users would get less code to open, read, preprocess, parse, ... if
         they don't need sched.h
      b) sched.h stops being dependency for significant number of files:
         on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
         after patch it's only 3744 (-8.3%).
      
      Cross-compile tested on
      
      	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
      	alpha alpha-up
      	arm
      	i386 i386-up i386-defconfig i386-allnoconfig
      	ia64 ia64-up
      	m68k
      	mips
      	parisc parisc-up
      	powerpc powerpc-up
      	s390 s390-up
      	sparc sparc-up
      	sparc64 sparc64-up
      	um-x86_64
      	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig
      
      as well as my two usual configs.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e8edc6e0
  8. 09 12月, 2006 1 次提交
    • P
      [PATCH] lockdep: annotate nfsd4 recover code · 4b75f78e
      Peter Zijlstra 提交于
      > =============================================
      > [ INFO: possible recursive locking detected ]
      > 2.6.18-1.2724.lockdepPAE #1
      > ---------------------------------------------
      > nfsd/6884 is trying to acquire lock:
      >  (&inode->i_mutex){--..}, at: [<c04811e5>] vfs_rmdir+0x73/0xf4
      >
      > but task is already holding lock:
      >  (&inode->i_mutex){--..}, at: [<f8dfa621>]
      > nfsd4_clear_clid_dir+0x1f/0x3d [nfsd]
      >
      > other info that might help us debug this:
      > 3 locks held by nfsd/6884:
      >  #0:  (hash_sem){----}, at: [<f8de05eb>] nfsd+0x181/0x2ea [nfsd]
      >  #1:  (client_mutex){--..}, at: [<f8df6d19>]
      > nfsd4_setclientid_confirm+0x3b/0x2cf [nfsd]
      >  #2:  (&inode->i_mutex){--..}, at: [<f8dfa621>]
      > nfsd4_clear_clid_dir+0x1f/0x3d [nfsd]
      >
      > stack backtrace:
      >  [<c040524d>] dump_trace+0x69/0x1af
      >  [<c04053ab>] show_trace_log_lvl+0x18/0x2c
      >  [<c040595f>] show_trace+0xf/0x11
      >  [<c0405a53>] dump_stack+0x15/0x17
      >  [<c043ca7a>] __lock_acquire+0x110/0x9b6
      >  [<c043d91e>] lock_acquire+0x5c/0x7a
      >  [<c061a41b>] __mutex_lock_slowpath+0xde/0x234
      >  [<c04811e5>] vfs_rmdir+0x73/0xf4
      >  [<f8dfa62b>] nfsd4_clear_clid_dir+0x29/0x3d [nfsd]
      >  [<f8dfa733>] nfsd4_remove_clid_dir+0xb8/0xf8 [nfsd]
      >  [<f8df6e90>] nfsd4_setclientid_confirm+0x1b2/0x2cf [nfsd]
      >  [<f8def19a>] nfsd4_proc_compound+0x137a/0x166c [nfsd]
      >  [<f8de00d5>] nfsd_dispatch+0xc5/0x180 [nfsd]
      >  [<f8d09d83>] svc_process+0x3bd/0x631 [sunrpc]
      >  [<f8de0604>] nfsd+0x19a/0x2ea [nfsd]
      >  [<c0404e27>] kernel_thread_helper+0x7/0x10
      > DWARF2 unwinder stuck at kernel_thread_helper+0x7/0x10
      > Leftover inexact backtrace:
      >  =======================
      
      Some nesting annotation to the nfsd4 recovery code.
      The vfs operations called will take dentry->d_inode->i_mutex.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Neil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4b75f78e
  9. 04 11月, 2006 1 次提交
    • S
      [PATCH] NFS4: fix for recursive locking problem · 7ef55b8a
      Srinivasa Ds 提交于
      When I was performing some operations on NFS, I got below error on server
      side.
      
        =============================================
        [ INFO: possible recursive locking detected ]
        2.6.19-prep #1
        ---------------------------------------------
        nfsd4/3525 is trying to acquire lock:
         (&inode->i_mutex){--..}, at: [<c0611e5a>] mutex_lock+0x21/0x24
      
        but task is already holding lock:
         (&inode->i_mutex){--..}, at: [<c0611e5a>] mutex_lock+0x21/0x24
      
        other info that might help us debug this:
        2 locks held by nfsd4/3525:
         #0:  (client_mutex){--..}, at: [<c0611e5a>] mutex_lock+0x21/0x24
         #1:  (&inode->i_mutex){--..}, at: [<c0611e5a>] mutex_lock+0x21/0x24
      
        stack backtrace:
         [<c04051ed>] show_trace_log_lvl+0x58/0x16a
         [<c04057fa>] show_trace+0xd/0x10
         [<c0405913>] dump_stack+0x19/0x1b
         [<c043b6f1>] __lock_acquire+0x778/0x99c
         [<c043be86>] lock_acquire+0x4b/0x6d
         [<c0611ceb>] __mutex_lock_slowpath+0xbc/0x20a
         [<c0611e5a>] mutex_lock+0x21/0x24
         [<c047fd7e>] vfs_rmdir+0x76/0xf8
         [<f94b7ce9>] nfsd4_clear_clid_dir+0x2c/0x41 [nfsd]
         [<f94b7de9>] nfsd4_remove_clid_dir+0xb1/0xe8 [nfsd]
         [<f94b307b>] laundromat_main+0x9b/0x1c3 [nfsd]
         [<c04333d6>] run_workqueue+0x7a/0xbb
         [<c0433d0b>] worker_thread+0xd2/0x107
         [<c0436285>] kthread+0xc3/0xf2
         [<c0402005>] kernel_thread_helper+0x5/0xb
        ===================================================================
      
      Cause for this problem was,2 successive mutex_lock calls on 2 diffrent inodes ,as shown below
      
      	static int
      	nfsd4_clear_clid_dir(struct dentry *dir, struct dentry *dentry)
      	{
      	        int status;
      
      	        /* For now this directory should already be empty, but we empty it of
              	 * any regular files anyway, just in case the directory was created by
      	         * a kernel from the future.... */
              	nfsd4_list_rec_dir(dentry, nfsd4_remove_clid_file);
      	        mutex_lock(&dir->d_inode->i_mutex);
      	        status = vfs_rmdir(dir->d_inode, dentry);
      	...
      
      	int vfs_rmdir(struct inode *dir, struct dentry *dentry)
      	{
      	        int error = may_delete(dir, dentry, 1);
      
      	        if (error)
      	                return error;
      
      	        if (!dir->i_op || !dir->i_op->rmdir)
              	        return -EPERM;
      
      	        DQUOT_INIT(dir);
      
      	        mutex_lock(&dentry->d_inode->i_mutex);
      	...
      
      So I have developed the patch to overcome this problem.
      Signed-off-by: NSrinivasa DS <srinivasa@in.ibm.com>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7ef55b8a
  10. 21 10月, 2006 1 次提交
  11. 03 10月, 2006 1 次提交
    • D
      [PATCH] VFS: Make filldir_t and struct kstat deal in 64-bit inode numbers · afefdbb2
      David Howells 提交于
      These patches make the kernel pass 64-bit inode numbers internally when
      communicating to userspace, even on a 32-bit system.  They are required
      because some filesystems have intrinsic 64-bit inode numbers: NFS3+ and XFS
      for example.  The 64-bit inode numbers are then propagated to userspace
      automatically where the arch supports it.
      
      Problems have been seen with userspace (eg: ld.so) using the 64-bit inode
      number returned by stat64() or getdents64() to differentiate files, and
      failing because the 64-bit inode number space was compressed to 32-bits, and
      so overlaps occur.
      
      This patch:
      
      Make filldir_t take a 64-bit inode number and struct kstat carry a 64-bit
      inode number so that 64-bit inode numbers can be passed back to userspace.
      
      The stat functions then returns the full 64-bit inode number where
      available and where possible.  If it is not possible to represent the inode
      number supplied by the filesystem in the field provided by userspace, then
      error EOVERFLOW will be issued.
      
      Similarly, the getdents/readdir functions now pass the full 64-bit inode
      number to userspace where possible, returning EOVERFLOW instead when a
      directory entry is encountered that can't be properly represented.
      
      Note that this means that some inodes will not be stat'able on a 32-bit
      system with old libraries where they were before - but it does mean that
      there will be no ambiguity over what a 32-bit inode number refers to.
      
      Note similarly that directory scans may be cut short with an error on a
      32-bit system with old libraries where the scan would work before for the
      same reasons.
      
      It is judged unlikely that this situation will occur because modern glibc
      uses 64-bit capable versions of stat and getdents class functions
      exclusively, and that older systems are unlikely to encounter
      unrepresentable inode numbers anyway.
      
      [akpm: alpha build fix]
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      afefdbb2
  12. 21 9月, 2006 1 次提交
  13. 19 1月, 2006 2 次提交
  14. 10 1月, 2006 1 次提交
  15. 02 9月, 2005 2 次提交
  16. 08 7月, 2005 3 次提交
  17. 24 6月, 2005 4 次提交