]> Git Repo - linux.git/commitdiff
Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
authorLinus Torvalds <[email protected]>
Wed, 18 May 2016 17:01:47 +0000 (10:01 -0700)
committerLinus Torvalds <[email protected]>
Wed, 18 May 2016 17:01:47 +0000 (10:01 -0700)
Pull cifs updates from Steve French:
 "Various small CIFS and SMB3 fixes (including some for stable)"

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
  remove directory incorrectly tries to set delete on close on non-empty directories
  Update cifs.ko version to 2.09
  fs/cifs: correctly to anonymous authentication for the NTLM(v2) authentication
  fs/cifs: correctly to anonymous authentication for the NTLM(v1) authentication
  fs/cifs: correctly to anonymous authentication for the LANMAN authentication
  fs/cifs: correctly to anonymous authentication via NTLMSSP
  cifs: remove any preceding delimiter from prefix_path
  cifs: Use file_dentry()

1  2 
fs/cifs/cifsfs.h
fs/cifs/connect.c
fs/cifs/file.c

diff --combined fs/cifs/cifsfs.h
index c1e749af749b26b5624cd5f82b818db7e1ab68b5,5d0d2ff67a4b74bb337d087dab640bf719aa7d8e..9dcf974acc47f657ce5da39804bf7f887aeafc31
@@@ -120,19 -120,15 +120,19 @@@ extern const char *cifs_get_link(struc
                        struct delayed_call *);
  extern int cifs_symlink(struct inode *inode, struct dentry *direntry,
                        const char *symname);
 -extern int    cifs_removexattr(struct dentry *, const char *);
 -extern int    cifs_setxattr(struct dentry *, const char *, const void *,
 -                      size_t, int);
 -extern ssize_t        cifs_getxattr(struct dentry *, struct inode *, const char *, void *, size_t);
 +
 +#ifdef CONFIG_CIFS_XATTR
 +extern const struct xattr_handler *cifs_xattr_handlers[];
  extern ssize_t        cifs_listxattr(struct dentry *, char *, size_t);
 +#else
 +# define cifs_xattr_handlers NULL
 +# define cifs_listxattr NULL
 +#endif
 +
  extern long cifs_ioctl(struct file *filep, unsigned int cmd, unsigned long arg);
  #ifdef CONFIG_CIFS_NFSD_EXPORT
  extern const struct export_operations cifs_export_ops;
  #endif /* CONFIG_CIFS_NFSD_EXPORT */
  
- #define CIFS_VERSION   "2.08"
+ #define CIFS_VERSION   "2.09"
  #endif                                /* _CIFSFS_H */
diff --combined fs/cifs/connect.c
index 2e2e0a6242d6ea268ded63f8b862c8b45e1a0d22,078b7311c3fa980015bb91dd29840e043c3d56eb..1bb258af1648e660c9bc054e49adea202f9136aa
@@@ -1196,8 -1196,12 +1196,12 @@@ cifs_parse_devname(const char *devname
  
        convert_delimiter(vol->UNC, '\\');
  
-       /* If pos is NULL, or is a bogus trailing delimiter then no prepath */
-       if (!*pos++ || !*pos)
+       /* skip any delimiter */
+       if (*pos == '/' || *pos == '\\')
+               pos++;
+       /* If pos is NULL then no prepath */
+       if (!*pos)
                return 0;
  
        vol->prepath = kstrdup(pos, GFP_KERNEL);
@@@ -2918,7 -2922,7 +2922,7 @@@ static inline voi
  cifs_reclassify_socket4(struct socket *sock)
  {
        struct sock *sk = sock->sk;
 -      BUG_ON(sock_owned_by_user(sk));
 +      BUG_ON(!sock_allow_reclassification(sk));
        sock_lock_init_class_and_name(sk, "slock-AF_INET-CIFS",
                &cifs_slock_key[0], "sk_lock-AF_INET-CIFS", &cifs_key[0]);
  }
@@@ -2927,7 -2931,7 +2931,7 @@@ static inline voi
  cifs_reclassify_socket6(struct socket *sock)
  {
        struct sock *sk = sock->sk;
 -      BUG_ON(sock_owned_by_user(sk));
 +      BUG_ON(!sock_allow_reclassification(sk));
        sock_lock_init_class_and_name(sk, "slock-AF_INET6-CIFS",
                &cifs_slock_key[1], "sk_lock-AF_INET6-CIFS", &cifs_key[1]);
  }
diff --combined fs/cifs/file.c
index 9b51d4936a292e7fda96998f11635387cf567ee6,489ddc79710578bd993d792be8a90d2fe4fe68b6..f3a90298dfe2108a8540937c5bfedb100f29c1e9
@@@ -271,7 -271,7 +271,7 @@@ struct cifsFileInfo 
  cifs_new_fileinfo(struct cifs_fid *fid, struct file *file,
                  struct tcon_link *tlink, __u32 oplock)
  {
-       struct dentry *dentry = file->f_path.dentry;
+       struct dentry *dentry = file_dentry(file);
        struct inode *inode = d_inode(dentry);
        struct cifsInodeInfo *cinode = CIFS_I(inode);
        struct cifsFileInfo *cfile;
@@@ -461,7 -461,7 +461,7 @@@ int cifs_open(struct inode *inode, stru
        tcon = tlink_tcon(tlink);
        server = tcon->ses->server;
  
-       full_path = build_path_from_dentry(file->f_path.dentry);
+       full_path = build_path_from_dentry(file_dentry(file));
        if (full_path == NULL) {
                rc = -ENOMEM;
                goto out;
@@@ -2687,8 -2687,11 +2687,8 @@@ cifs_writev(struct kiocb *iocb, struct 
  out:
        inode_unlock(inode);
  
 -      if (rc > 0) {
 -              ssize_t err = generic_write_sync(file, iocb->ki_pos - rc, rc);
 -              if (err < 0)
 -                      rc = err;
 -      }
 +      if (rc > 0)
 +              rc = generic_write_sync(iocb, rc);
        up_read(&cinode->lock_sem);
        return rc;
  }
@@@ -3851,7 -3854,7 +3851,7 @@@ void cifs_oplock_break(struct work_stru
   * Direct IO is not yet supported in the cached mode. 
   */
  static ssize_t
 -cifs_direct_io(struct kiocb *iocb, struct iov_iter *iter, loff_t pos)
 +cifs_direct_io(struct kiocb *iocb, struct iov_iter *iter)
  {
          /*
           * FIXME
This page took 0.093102 seconds and 4 git commands to generate.