1. 08 6月, 2018 1 次提交
  2. 02 4月, 2018 1 次提交
  3. 09 7月, 2017 1 次提交
  4. 15 12月, 2016 1 次提交
  5. 28 9月, 2016 1 次提交
  6. 31 12月, 2015 1 次提交
  7. 09 12月, 2015 1 次提交
    • A
      replace ->follow_link() with new method that could stay in RCU mode · 6b255391
      Al Viro 提交于
      new method: ->get_link(); replacement of ->follow_link().  The differences
      are:
      	* inode and dentry are passed separately
      	* might be called both in RCU and non-RCU mode;
      the former is indicated by passing it a NULL dentry.
      	* when called that way it isn't allowed to block
      and should return ERR_PTR(-ECHILD) if it needs to be called
      in non-RCU mode.
      
      It's a flagday change - the old method is gone, all in-tree instances
      converted.  Conversion isn't hard; said that, so far very few instances
      do not immediately bail out when called in RCU mode.  That'll change
      in the next commits.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6b255391
  8. 11 5月, 2015 3 次提交
    • A
      don't pass nameidata to ->follow_link() · 6e77137b
      Al Viro 提交于
      its only use is getting passed to nd_jump_link(), which can obtain
      it from current->nameidata
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6e77137b
    • A
      new ->follow_link() and ->put_link() calling conventions · 680baacb
      Al Viro 提交于
      a) instead of storing the symlink body (via nd_set_link()) and returning
      an opaque pointer later passed to ->put_link(), ->follow_link() _stores_
      that opaque pointer (into void * passed by address by caller) and returns
      the symlink body.  Returning ERR_PTR() on error, NULL on jump (procfs magic
      symlinks) and pointer to symlink body for normal symlinks.  Stored pointer
      is ignored in all cases except the last one.
      
      Storing NULL for opaque pointer (or not storing it at all) means no call
      of ->put_link().
      
      b) the body used to be passed to ->put_link() implicitly (via nameidata).
      Now only the opaque pointer is.  In the cases when we used the symlink body
      to free stuff, ->follow_link() now should store it as opaque pointer in addition
      to returning it.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      680baacb
    • N
      Fix that several functions handle incorrect value of mapchars · bc8ebdc4
      Nakajima Akira 提交于
      Cifs client has problem with reserved chars filename.
      
      [BUG1] : several functions handle incorrect value of mapchars
      -	cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
      +	cifs_remap(cifs_sb));
      
      [BUG2] : forget to convert reserved chars when creating SymbolicLink.
      -	CIFSUnixCreateSymLink() calls cifs_strtoUTF16
      +	CIFSUnixCreateSymLink() calls cifsConvertToUTF16() with remap
      
      [BUG3] : forget to convert reserved chars when getting SymbolicLink.
      -	CIFSSMBUnixQuerySymLink() calls cifs_strtoUTF16
      +	CIFSSMBUnixQuerySymLink() calls cifsConvertToUTF16() with remap
      
      [BUG4] : /proc/mounts don't show "mapposix" when using mapposix mount option
      +	    cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SFM_CHR)
      + 		seq_puts(s, ",mapposix");
      
      Reported-by: t.wede@kw-reneg.de
      Reported-by: NNakajima Akira <nakajima.akira@nttcom.co.jp>
      Signed-off-by: NNakajima Akira <nakajima.akira@nttcom.co.jp>
      Signed-off-by: NCarl Schaefer <schaefer@trilug.org>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      bc8ebdc4
  9. 16 4月, 2015 1 次提交
  10. 18 10月, 2014 1 次提交
  11. 17 10月, 2014 3 次提交
    • S
      Remap reserved posix characters by default (part 3/3) · 2baa2682
      Steve French 提交于
      This is a bigger patch, but its size is mostly due to
      a single change for how we check for remapping illegal characters
      in file names - a lot of repeated, small changes to
      the way callers request converting file names.
      
      The final patch in the series does the following:
      
      1) changes default behavior for cifs to be more intuitive.
      Currently we do not map by default to seven reserved characters,
      ie those valid in POSIX but not in NTFS/CIFS/SMB3/Windows,
      unless a mount option (mapchars) is specified.  Change this
      to by default always map and map using the SFM maping
      (like the Mac uses) unless the server negotiates the CIFS Unix
      Extensions (like Samba does when mounting with the cifs protocol)
      when the remapping of the characters is unnecessary.  This should
      help SMB3 mounts in particular since Samba will likely be
      able to implement this mapping with its new "vfs_fruit" module
      as it will be doing for the Mac.
      2) if the user specifies the existing "mapchars" mount option then
      use the "SFU" (Microsoft Services for Unix, SUA) style mapping of
      the seven characters instead.
      3) if the user specifies "nomapposix" then disable SFM/MAC style mapping
      (so no character remapping would be used unless the user specifies
      "mapchars" on mount as well, as above).
      4) change all the places in the code that check for the superblock
      flag on the mount which is set by mapchars and passed in on all
      path based operation and change it to use a small function call
      instead to set the mapping type properly (and check for the
      mapping type in the cifs unicode functions)
      Signed-off-by: NSteve French <smfrench@gmail.com>
      2baa2682
    • S
      mfsymlinks support for SMB2.1/SMB3. Part 2 query symlink · c22870ea
      Steve French 提交于
      Adds support on SMB2.1 and SMB3 mounts for emulation of symlinks
      via the "Minshall/French" symlink format already used for cifs
      mounts when mfsymlinks mount option is used (and also used by Apple).
        http://wiki.samba.org/index.php/UNIX_Extensions#Minshall.2BFrench_symlinks
      This second patch adds support to query them (recognize them as symlinks
      and read them).  Third version of patch makes minor corrections
      to error handling.
      Signed-off-by: NSteve French <smfrench@gmail.com>
      Reviewed-by: NStefan Metzmacher <metze@samba.org>
      c22870ea
    • S
      Add mfsymlinks support for SMB2.1/SMB3. Part 1 create symlink · 5ab97578
      Steve French 提交于
      Adds support on SMB2.1 and SMB3 mounts for emulation of symlinks
      via the "Minshall/French" symlink format already used for cifs
      mounts when mfsymlinks mount option is used (and also used by Apple).
      http://wiki.samba.org/index.php/UNIX_Extensions#Minshall.2BFrench_symlinks
      This first patch adds support to create them.  The next patch will
      add support for recognizing them and reading them.  Although CIFS/SMB3
      have other types of symlinks, in the many use cases they aren't
      practical (e.g. either require cifs only mounts with unix extensions
      to Samba, or require the user to be Administrator to Windows for SMB3).
      This also helps enable running additional xfstests over SMB3 (since some
      xfstests directly or indirectly require symlink support).
      Signed-off-by: NSteve French <smfrench@gmail.com>
      CC: Stefan Metzmacher <metze@samba.org>
      5ab97578
  12. 16 9月, 2014 1 次提交
  13. 15 9月, 2014 1 次提交
  14. 17 6月, 2014 1 次提交
  15. 31 1月, 2014 1 次提交
  16. 20 1月, 2014 8 次提交
  17. 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
  18. 25 10月, 2013 1 次提交
  19. 09 9月, 2013 1 次提交
  20. 31 7月, 2013 1 次提交
    • S
      Do not attempt to do cifs operations reading symlinks with SMB2 · 1b244081
      Steve French 提交于
      When use of symlinks is enabled (mounting with mfsymlinks option) to
      non-Samba servers, we always tried to use cifs, even when we
      were mounted with SMB2 or SMB3, which causes the server to drop the
      network connection.
      
      This patch separates out the protocol specific operations for cifs from
      the code which recognizes symlinks, and fixes the problem where
      with SMB2 mounts we attempt cifs operations to open and read
      symlinks.  The next patch will add support for SMB2 for opening
      and reading symlinks.  Additional followon patches will address
      the similar problem creating symlinks.
      Signed-off-by: NSteve French <smfrench@gmail.com>
      1b244081
  21. 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
  22. 09 1月, 2013 1 次提交
  23. 25 9月, 2012 1 次提交
  24. 20 8月, 2012 1 次提交
  25. 25 7月, 2012 1 次提交
  26. 24 7月, 2012 2 次提交
  27. 02 11月, 2011 1 次提交
  28. 13 10月, 2011 1 次提交
    • S
      cifs: Add mount options for backup intent (try #6) · 3d3ea8e6
      Shirish Pargaonkar 提交于
      Add mount options backupuid and backugid.
      
      It allows an authenticated user to access files with the intent to back them
      up including their ACLs, who may not have access permission but has
      "Backup files and directories user right" on them (by virtue of being part
      of the built-in group Backup Operators.
      
      When mount options backupuid is specified, cifs client restricts the
      use of backup intents to the user whose effective user id is specified
      along with the mount option.
      
      When mount options backupgid is specified, cifs client restricts the
      use of backup intents to the users whose effective user id belongs to the
      group id specified along with the mount option.
      
      If an authenticated user is not part of the built-in group Backup Operators
      at the server, access to such files is denied, even if allowed by the client.
      Signed-off-by: NShirish Pargaonkar <shirishpargaonkar@gmail.com>
      Reviewed-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      3d3ea8e6