]> Git Repo - linux.git/commitdiff
Merge branch 'work.mount-base' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
authorLinus Torvalds <[email protected]>
Wed, 18 Sep 2019 20:15:58 +0000 (13:15 -0700)
committerLinus Torvalds <[email protected]>
Wed, 18 Sep 2019 20:15:58 +0000 (13:15 -0700)
Pull vfs mount API infrastructure updates from Al Viro:
 "Infrastructure bits of mount API conversions.

  The rest is more of per-filesystem updates and that will happen
  in separate pull requests"

* 'work.mount-base' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  mtd: Provide fs_context-aware mount_mtd() replacement
  vfs: Create fs_context-aware mount_bdev() replacement
  new helper: get_tree_keyed()
  vfs: set fs_context::user_ns for reconfigure

1  2 
fs/nfsd/nfsctl.c

diff --combined fs/nfsd/nfsctl.c
index 3cf4f6aa48d605499b9b8b766084a50661e7d3a8,6952233949851859de2d0bd9b872638e7585d9ac..2c215171c0eb65584cc461c0cc64c587daa53bc5
@@@ -1171,17 -1171,13 +1171,17 @@@ static struct inode *nfsd_get_inode(str
        return inode;
  }
  
 -static int __nfsd_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
 +static int __nfsd_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode, struct nfsdfs_client *ncl)
  {
        struct inode *inode;
  
        inode = nfsd_get_inode(dir->i_sb, mode);
        if (!inode)
                return -ENOMEM;
 +      if (ncl) {
 +              inode->i_private = ncl;
 +              kref_get(&ncl->cl_ref);
 +      }
        d_add(dentry, inode);
        inc_nlink(dir);
        fsnotify_mkdir(dir, dentry);
@@@ -1198,14 -1194,17 +1198,14 @@@ static struct dentry *nfsd_mkdir(struc
        dentry = d_alloc_name(parent, name);
        if (!dentry)
                goto out_err;
 -      ret = __nfsd_mkdir(d_inode(parent), dentry, S_IFDIR | 0600);
 +      ret = __nfsd_mkdir(d_inode(parent), dentry, S_IFDIR | 0600, ncl);
        if (ret)
                goto out_err;
 -      if (ncl) {
 -              d_inode(dentry)->i_private = ncl;
 -              kref_get(&ncl->cl_ref);
 -      }
  out:
        inode_unlock(dir);
        return dentry;
  out_err:
 +      dput(dentry);
        dentry = ERR_PTR(ret);
        goto out;
  }
@@@ -1215,9 -1214,11 +1215,9 @@@ static void clear_ncl(struct inode *ino
        struct nfsdfs_client *ncl = inode->i_private;
  
        inode->i_private = NULL;
 -      synchronize_rcu();
        kref_put(&ncl->cl_ref, ncl->cl_release);
  }
  
 -
  static struct nfsdfs_client *__get_nfsdfs_client(struct inode *inode)
  {
        struct nfsdfs_client *nc = inode->i_private;
@@@ -1231,9 -1232,9 +1231,9 @@@ struct nfsdfs_client *get_nfsdfs_client
  {
        struct nfsdfs_client *nc;
  
 -      rcu_read_lock();
 +      inode_lock_shared(inode);
        nc = __get_nfsdfs_client(inode);
 -      rcu_read_unlock();
 +      inode_unlock_shared(inode);
        return nc;
  }
  /* from __rpc_unlink */
@@@ -1385,8 -1386,7 +1385,7 @@@ static int nfsd_fill_super(struct super
  
  static int nfsd_fs_get_tree(struct fs_context *fc)
  {
-       fc->s_fs_info = get_net(fc->net_ns);
-       return vfs_get_super(fc, vfs_get_keyed_super, nfsd_fill_super);
+       return get_tree_keyed(fc, nfsd_fill_super, get_net(fc->net_ns));
  }
  
  static void nfsd_fs_free_fc(struct fs_context *fc)
This page took 0.068246 seconds and 4 git commands to generate.