1. 12 4月, 2015 4 次提交
  2. 11 2月, 2015 1 次提交
  3. 09 10月, 2014 1 次提交
  4. 05 6月, 2014 1 次提交
  5. 02 6月, 2014 1 次提交
    • J
      locks: ensure that fl_owner is always initialized properly in flock and lease codepaths · 130d1f95
      Jeff Layton 提交于
      Currently, the fl_owner isn't set for flock locks. Some filesystems use
      byte-range locks to simulate flock locks and there is a common idiom in
      those that does:
      
          fl->fl_owner = (fl_owner_t)filp;
          fl->fl_start = 0;
          fl->fl_end = OFFSET_MAX;
      
      Since flock locks are generally "owned" by the open file description,
      move this into the common flock lock setup code. The fl_start and fl_end
      fields are already set appropriately, so remove the unneeded setting of
      that in flock ops in those filesystems as well.
      
      Finally, the lease code also sets the fl_owner as if they were owned by
      the process and not the open file description. This is incorrect as
      leases have the same ownership semantics as flock locks. Set them the
      same way. The lease code doesn't actually use the fl_owner value for
      anything, so this is more for consistency's sake than a bugfix.
      Reported-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      Signed-off-by: NJeff Layton <jlayton@poochiereds.net>
      Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (Staging portion)
      Acked-by: NJ. Bruce Fields <bfields@fieldses.org>
      130d1f95
  6. 07 5月, 2014 2 次提交
  7. 08 4月, 2014 1 次提交
  8. 10 1月, 2014 1 次提交
  9. 24 11月, 2013 1 次提交
  10. 25 10月, 2013 1 次提交
  11. 26 8月, 2013 1 次提交
    • W
      fs/9p: avoid accessing utsname after namespace has been torn down · 50192abe
      Will Deacon 提交于
      During trinity fuzzing in a kvmtool guest, I stumbled across the
      following:
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000004
      PC is at v9fs_file_do_lock+0xc8/0x1a0
      LR is at v9fs_file_do_lock+0x48/0x1a0
      [<c01e2ed0>] (v9fs_file_do_lock+0xc8/0x1a0) from [<c0119154>] (locks_remove_flock+0x8c/0x124)
      [<c0119154>] (locks_remove_flock+0x8c/0x124) from [<c00d9bf0>] (__fput+0x58/0x1e4)
      [<c00d9bf0>] (__fput+0x58/0x1e4) from [<c0044340>] (task_work_run+0xac/0xe8)
      [<c0044340>] (task_work_run+0xac/0xe8) from [<c002e36c>] (do_exit+0x6bc/0x8d8)
      [<c002e36c>] (do_exit+0x6bc/0x8d8) from [<c002e674>] (do_group_exit+0x3c/0xb0)
      [<c002e674>] (do_group_exit+0x3c/0xb0) from [<c002e6f8>] (__wake_up_parent+0x0/0x18)
      
      I believe this is due to an attempt to access utsname()->nodename, after
      exit_task_namespaces() has been called, leaving current->nsproxy->uts_ns
      as NULL and causing the above dereference.
      
      A similar issue was fixed for lockd in 9a1b6bf8 ("LOCKD: Don't call
      utsname()->nodename from nlmclnt_setlockargs"), so this patch attempts
      something similar for 9pfs.
      
      Cc: Eric Van Hensbergen <ericvh@gmail.com>
      Cc: Ron Minnich <rminnich@sandia.gov>
      Cc: Latchesar Ionkov <lucho@ionkov.net>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      50192abe
  12. 23 2月, 2013 1 次提交
  13. 22 2月, 2013 1 次提交
  14. 11 2月, 2013 1 次提交
  15. 09 10月, 2012 1 次提交
    • K
      mm: kill vma flag VM_CAN_NONLINEAR · 0b173bc4
      Konstantin Khlebnikov 提交于
      Move actual pte filling for non-linear file mappings into the new special
      vma operation: ->remap_pages().
      
      Filesystems must implement this method to get non-linear mapping support,
      if it uses filemap_fault() then generic_file_remap_pages() can be used.
      
      Now device drivers can implement this method and obtain nonlinear vma support.
      Signed-off-by: NKonstantin Khlebnikov <khlebnikov@openvz.org>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Carsten Otte <cotte@de.ibm.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>	#arch/tile
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Morris <james.l.morris@oracle.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
      Cc: Matt Helsley <matthltc@us.ibm.com>
      Cc: Nick Piggin <npiggin@kernel.dk>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Cc: Venkatesh Pallipadi <venki@google.com>
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0b173bc4
  16. 31 7月, 2012 1 次提交
  17. 06 1月, 2012 2 次提交
    • J
      9p: Reduce object size with CONFIG_NET_9P_DEBUG · 5d385153
      Joe Perches 提交于
      Reduce object size by deduplicating formats.
      
      Use vsprintf extension %pV.
      Rename P9_DPRINTK uses to p9_debug, align arguments.
      Add function for _p9_debug and macro to add __func__.
      Add missing "\n"s to p9_debug uses.
      Remove embedded function names as p9_debug adds it.
      Remove P9_EPRINTK macro and convert use to pr_<level>.
      Add and use pr_fmt and pr_<level>.
      
      $ size fs/9p/built-in.o*
         text	   data	    bss	    dec	    hex	filename
        62133	    984	  16000	  79117	  1350d	fs/9p/built-in.o.new
        67342	    984	  16928	  85254	  14d06	fs/9p/built-in.o.old
      $ size net/9p/built-in.o*
         text	   data	    bss	    dec	    hex	filename
        88792	   4148	  22024	 114964	  1c114	net/9p/built-in.o.new
        94072	   4148	  23232	 121452	  1da6c	net/9p/built-in.o.old
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      5d385153
    • J
      fs/9p: check schedule_timeout_interruptible return value · a0ea787b
      Jim Garlick 提交于
      In v9fs_file_do_lock() we need to check return value of
      schedule_timeout_interruptible() and exit the loop when it
      returns nonzero, otherwise the loop is not really interruptible
      and after the signal, the loop is no longer throttled by
      P9_LOCK_TIMEOUT.
      Signed-off-by: NJim Garlick <garlick.jim@gmail.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      a0ea787b
  18. 06 9月, 2011 2 次提交
  19. 21 7月, 2011 1 次提交
    • J
      fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers · 02c24a82
      Josef Bacik 提交于
      Btrfs needs to be able to control how filemap_write_and_wait_range() is called
      in fsync to make it less of a painful operation, so push down taking i_mutex and
      the calling of filemap_write_and_wait() down into the ->fsync() handlers.  Some
      file systems can drop taking the i_mutex altogether it seems, like ext3 and
      ocfs2.  For correctness sake I just pushed everything down in all cases to make
      sure that we keep the current behavior the same for everybody, and then each
      individual fs maintainer can make up their mind about what to do from there.
      Thanks,
      Acked-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NJosef Bacik <josef@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      02c24a82
  20. 23 3月, 2011 3 次提交
  21. 15 3月, 2011 8 次提交
  22. 28 10月, 2010 4 次提交
    • V
      9p: Add datasync to client side TFSYNC/RFSYNC for dotl · b165d601
      Venkateswararao Jujjuri (JV) 提交于
      SYNOPSIS
          size[4] Tfsync tag[2] fid[4] datasync[4]
      
          size[4] Rfsync tag[2]
      
      DESCRIPTION
      
          The Tfsync transaction transfers ("flushes") all modified in-core data of
          file identified by fid to the disk device (or other  permanent  storage
          device)  where that  file  resides.
      
          If datasync flag is specified data will be fleshed but does not flush
          modified metadata unless  that  metadata  is  needed  in order to allow a
          subsequent data retrieval to be correctly handled.
      Signed-off-by: NVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      b165d601
    • M
      9p: Implement TGETLOCK · 1d769cd1
      M. Mohan Kumar 提交于
      Synopsis
      
          size[4] TGetlock tag[2] fid[4] getlock[n]
          size[4] RGetlock tag[2] getlock[n]
      
      Description
      
      TGetlock is used to test for the existence of byte range posix locks on a file
      identified by given fid. The reply contains getlock structure. If the lock could
      be placed it returns F_UNLCK in type field of getlock structure.  Otherwise it
      returns the details of the conflicting locks in the getlock structure
      
          getlock structure:
            type[1] - Type of lock: F_RDLCK, F_WRLCK
            start[8] - Starting offset for lock
            length[8] - Number of bytes to check for the lock
                   If length is 0, check for lock in all bytes starting at the location
                  'start' through to the end of file
            pid[4] - PID of the process that wants to take lock/owns the task
                     in case of reply
            client[4] - Client id of the system that owns the process which
                        has the conflicting lock
      Signed-off-by: NM. Mohan Kumar <mohan@in.ibm.com>
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      1d769cd1
    • M
      9p: Implement TLOCK · a099027c
      M. Mohan Kumar 提交于
      Synopsis
      
          size[4] TLock tag[2] fid[4] flock[n]
          size[4] RLock tag[2] status[1]
      
      Description
      
      Tlock is used to acquire/release byte range posix locks on a file
      identified by given fid. The reply contains status of the lock request
      
          flock structure:
              type[1] - Type of lock: F_RDLCK, F_WRLCK, F_UNLCK
              flags[4] - Flags could be either of
                P9_LOCK_FLAGS_BLOCK - Blocked lock request, if there is a
                  conflicting lock exists, wait for that lock to be released.
                P9_LOCK_FLAGS_RECLAIM - Reclaim lock request, used when client is
                  trying to reclaim a lock after a server restrart (due to crash)
              start[8] - Starting offset for lock
              length[8] - Number of bytes to lock
                If length is 0, lock all bytes starting at the location 'start'
                through to the end of file
              pid[4] - PID of the process that wants to take lock
              client_id[4] - Unique client id
      
              status[1] - Status of the lock request, can be
                P9_LOCK_SUCCESS(0), P9_LOCK_BLOCKED(1), P9_LOCK_ERROR(2) or
                P9_LOCK_GRACE(3)
                P9_LOCK_SUCCESS - Request was successful
                P9_LOCK_BLOCKED - A conflicting lock is held by another process
                P9_LOCK_ERROR - Error while processing the lock request
                P9_LOCK_GRACE - Server is in grace period, it can't accept new lock
                  requests in this period (except locks with
                  P9_LOCK_FLAGS_RECLAIM flag set)
      Signed-off-by: NM. Mohan Kumar <mohan@in.ibm.com>
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      a099027c
    • V
      [9p] Introduce client side TFSYNC/RFSYNC for dotl. · 920e65dc
      Venkateswararao Jujjuri (JV) 提交于
      SYNOPSIS
          size[4] Tfsync tag[2] fid[4]
      
          size[4] Rfsync tag[2]
      
      DESCRIPTION
      
      The Tfsync transaction transfers ("flushes") all modified in-core data of
      file identified by fid to the disk device (or other  permanent  storage
      device)  where that  file  resides.
      Signed-off-by: NVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      920e65dc