1. 20 1月, 2014 1 次提交
  2. 28 12月, 2013 1 次提交
    • S
      cifs: We do not drop reference to tlink in CIFSCheckMFSymlink() · 750b8de6
      Sachin Prabhu 提交于
      When we obtain tcon from cifs_sb, we use cifs_sb_tlink() to first obtain
      tlink which also grabs a reference to it. We do not drop this reference
      to tlink once we are done with the call.
      
      The patch fixes this issue by instead passing tcon as a parameter and
      avoids having to obtain a reference to the tlink. A lookup for the tcon
      is already made in the calling functions and this way we avoid having to
      re-run the lookup. This is also consistent with the argument list for
      other similar calls for M-F symlinks.
      
      We should also return an ENOSYS when we do not find a protocol specific
      function to lookup the MF Symlink data.
      Signed-off-by: NSachin Prabhu <sprabhu@redhat.com>
      Reviewed-by: NJeff Layton <jlayton@redhat.com>
      CC: Stable <stable@kernel.org>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      750b8de6
  3. 12 11月, 2013 1 次提交
  4. 21 9月, 2013 1 次提交
  5. 13 9月, 2013 1 次提交
  6. 09 9月, 2013 2 次提交
  7. 05 7月, 2013 1 次提交
    • S
      [CIFS] use sensible file nlink values if unprovided · 6658b9f7
      Steve French 提交于
      Certain servers may not set the NumberOfLinks field in query file/path
      info responses. In such a case, cifs_inode_needs_reval() assumes that
      all regular files are hardlinks and triggers revalidation, leading to
      excessive and unnecessary network traffic.
      
      This change hardcodes cf_nlink (and subsequently i_nlink) when not
      returned by the server, similar to what already occurs in cifs_mkdir().
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NDavid Disseldorp <ddiss@suse.de>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      6658b9f7
  8. 25 5月, 2013 1 次提交
  9. 09 5月, 2013 1 次提交
  10. 05 5月, 2013 1 次提交
    • J
      [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg · f96637be
      Joe Perches 提交于
      It's not obvious from reading the macro names that these macros
      are for debugging.  Convert the names to a single more typical
      kernel style cifs_dbg macro.
      
      	cERROR(1, ...)   -> cifs_dbg(VFS, ...)
      	cFYI(1, ...)     -> cifs_dbg(FYI, ...)
      	cFYI(DBG2, ...)  -> cifs_dbg(NOISY, ...)
      
      Move the terminating format newline from the macro to the call site.
      
      Add CONFIG_CIFS_DEBUG function cifs_vfs_err to emit the
      "CIFS VFS: " prefix for VFS messages.
      
      Size is reduced ~ 1% when CONFIG_CIFS_DEBUG is set (default y)
      
      $ size fs/cifs/cifs.ko*
         text    data     bss     dec     hex filename
       265245	   2525	    132	 267902	  4167e	fs/cifs/cifs.ko.new
       268359    2525     132  271016   422a8 fs/cifs/cifs.ko.old
      
      Other miscellaneous changes around these conversions:
      
      o Miscellaneous typo fixes
      o Add terminating \n's to almost all formats and remove them
        from the macros to be more kernel style like.  A few formats
        previously had defective \n's
      o Remove unnecessary OOM messages as kmalloc() calls dump_stack
      o Coalesce formats to make grep easier,
        added missing spaces when coalescing formats
      o Use %s, __func__ instead of embedded function name
      o Removed unnecessary "cifs: " prefixes
      o Convert kzalloc with multiply to kcalloc
      o Remove unused cifswarn macro
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      f96637be
  11. 14 3月, 2013 1 次提交
  12. 07 3月, 2013 2 次提交
  13. 28 2月, 2013 1 次提交
    • S
      hlist: drop the node parameter from iterators · b67bfe0d
      Sasha Levin 提交于
      I'm not sure why, but the hlist for each entry iterators were conceived
      
              list_for_each_entry(pos, head, member)
      
      The hlist ones were greedy and wanted an extra parameter:
      
              hlist_for_each_entry(tpos, pos, head, member)
      
      Why did they need an extra pos parameter? I'm not quite sure. Not only
      they don't really need it, it also prevents the iterator from looking
      exactly like the list iterator, which is unfortunate.
      
      Besides the semantic patch, there was some manual work required:
      
       - Fix up the actual hlist iterators in linux/list.h
       - Fix up the declaration of other iterators based on the hlist ones.
       - A very small amount of places were using the 'node' parameter, this
       was modified to use 'obj->member' instead.
       - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
       properly, so those had to be fixed up manually.
      
      The semantic patch which is mostly the work of Peter Senna Tschudin is here:
      
      @@
      iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;
      
      type T;
      expression a,c,d,e;
      identifier b;
      statement S;
      @@
      
      -T b;
          <+... when != b
      (
      hlist_for_each_entry(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_continue(a,
      - b,
      c) S
      |
      hlist_for_each_entry_from(a,
      - b,
      c) S
      |
      hlist_for_each_entry_rcu(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_rcu_bh(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_continue_rcu_bh(a,
      - b,
      c) S
      |
      for_each_busy_worker(a, c,
      - b,
      d) S
      |
      ax25_uid_for_each(a,
      - b,
      c) S
      |
      ax25_for_each(a,
      - b,
      c) S
      |
      inet_bind_bucket_for_each(a,
      - b,
      c) S
      |
      sctp_for_each_hentry(a,
      - b,
      c) S
      |
      sk_for_each(a,
      - b,
      c) S
      |
      sk_for_each_rcu(a,
      - b,
      c) S
      |
      sk_for_each_from
      -(a, b)
      +(a)
      S
      + sk_for_each_from(a) S
      |
      sk_for_each_safe(a,
      - b,
      c, d) S
      |
      sk_for_each_bound(a,
      - b,
      c) S
      |
      hlist_for_each_entry_safe(a,
      - b,
      c, d, e) S
      |
      hlist_for_each_entry_continue_rcu(a,
      - b,
      c) S
      |
      nr_neigh_for_each(a,
      - b,
      c) S
      |
      nr_neigh_for_each_safe(a,
      - b,
      c, d) S
      |
      nr_node_for_each(a,
      - b,
      c) S
      |
      nr_node_for_each_safe(a,
      - b,
      c, d) S
      |
      - for_each_gfn_sp(a, c, d, b) S
      + for_each_gfn_sp(a, c, d) S
      |
      - for_each_gfn_indirect_valid_sp(a, c, d, b) S
      + for_each_gfn_indirect_valid_sp(a, c, d) S
      |
      for_each_host(a,
      - b,
      c) S
      |
      for_each_host_safe(a,
      - b,
      c, d) S
      |
      for_each_mesh_entry(a,
      - b,
      c, d) S
      )
          ...+>
      
      [akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
      [akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
      [akpm@linux-foundation.org: checkpatch fixes]
      [akpm@linux-foundation.org: fix warnings]
      [akpm@linux-foudnation.org: redo intrusive kvm changes]
      Tested-by: NPeter Senna Tschudin <peter.senna@gmail.com>
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NSasha Levin <sasha.levin@oracle.com>
      Cc: Wu Fengguang <fengguang.wu@intel.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Gleb Natapov <gleb@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b67bfe0d
  14. 23 2月, 2013 1 次提交
  15. 13 2月, 2013 4 次提交
  16. 06 12月, 2012 1 次提交
  17. 29 9月, 2012 1 次提交
  18. 25 9月, 2012 7 次提交
  19. 20 8月, 2012 1 次提交
  20. 28 7月, 2012 3 次提交
  21. 25 7月, 2012 3 次提交
  22. 24 7月, 2012 1 次提交
  23. 14 7月, 2012 1 次提交
  24. 27 2月, 2012 1 次提交
    • P
      CIFS: Fix mkdir/rmdir bug for the non-POSIX case · 6de2ce42
      Pavel Shilovsky 提交于
      Currently we do inc/drop_nlink for a parent directory for every
      mkdir/rmdir calls. That's wrong when Unix extensions are disabled
      because in this case a server doesn't follow the same semantic and
      returns the old value on the next QueryInfo request. As the result,
      we update our value with the server one and then decrement it on
      every rmdir call - go to negative nlink values.
      
      Fix this by removing inc/drop_nlink for the parent directory from
      mkdir/rmdir, setting it for a revalidation and ignoring NumberOfLinks
      for directories when Unix extensions are disabled.
      Signed-off-by: NPavel Shilovsky <piastry@etersoft.ru>
      Reviewed-by: NJeff Layton <jlayton@samba.org>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      6de2ce42
  25. 04 1月, 2012 1 次提交