aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-10 19:10:49 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-10 19:10:49 -0500
commitcbfe0de303a55ed96d8831c2d5f56f8131cd6612 (patch)
treeb327762303c6a015421e4077e7c713b8a47a5e0e /fs/nfs
parent8322b6fddfd2cee41a7732284e5f04750511f4b2 (diff)
parentba00410b8131b23edfb0e09f8b6dd26c8eb621fb (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS changes from Al Viro: "First pile out of several (there _definitely_ will be more). Stuff in this one: - unification of d_splice_alias()/d_materialize_unique() - iov_iter rewrite - killing a bunch of ->f_path.dentry users (and f_dentry macro). Getting that completed will make life much simpler for unionmount/overlayfs, since then we'll be able to limit the places sensitive to file _dentry_ to reasonably few. Which allows to have file_inode(file) pointing to inode in a covered layer, with dentry pointing to (negative) dentry in union one. Still not complete, but much closer now. - crapectomy in lustre (dead code removal, mostly) - "let's make seq_printf return nothing" preparations - assorted cleanups and fixes There _definitely_ will be more piles" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits) copy_from_iter_nocache() new helper: iov_iter_kvec() csum_and_copy_..._iter() iov_iter.c: handle ITER_KVEC directly iov_iter.c: convert copy_to_iter() to iterate_and_advance iov_iter.c: convert copy_from_iter() to iterate_and_advance iov_iter.c: get rid of bvec_copy_page_{to,from}_iter() iov_iter.c: convert iov_iter_zero() to iterate_and_advance iov_iter.c: convert iov_iter_get_pages_alloc() to iterate_all_kinds iov_iter.c: convert iov_iter_get_pages() to iterate_all_kinds iov_iter.c: convert iov_iter_npages() to iterate_all_kinds iov_iter.c: iterate_and_advance iov_iter.c: macros for iterating over iov_iter kill f_dentry macro dcache: fix kmemcheck warning in switch_names new helper: audit_file() nfsd_vfs_write(): use file_inode() ncpfs: use file_inode() kill f_dentry uses lockd: get rid of ->f_path.dentry->d_sb ...
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/blocklayout/rpc_pipefs.c2
-rw-r--r--fs/nfs/dir.c6
-rw-r--r--fs/nfs/getroot.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/fs/nfs/blocklayout/rpc_pipefs.c b/fs/nfs/blocklayout/rpc_pipefs.c
index acbf9ca4018c..dbe5839cdeba 100644
--- a/fs/nfs/blocklayout/rpc_pipefs.c
+++ b/fs/nfs/blocklayout/rpc_pipefs.c
@@ -112,7 +112,7 @@ out_unlock:
112static ssize_t bl_pipe_downcall(struct file *filp, const char __user *src, 112static ssize_t bl_pipe_downcall(struct file *filp, const char __user *src,
113 size_t mlen) 113 size_t mlen)
114{ 114{
115 struct nfs_net *nn = net_generic(filp->f_dentry->d_sb->s_fs_info, 115 struct nfs_net *nn = net_generic(file_inode(filp)->i_sb->s_fs_info,
116 nfs_net_id); 116 nfs_net_id);
117 117
118 if (mlen != sizeof (struct bl_dev_msg)) 118 if (mlen != sizeof (struct bl_dev_msg))
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 6e62155abf26..9b0c55cb2a2e 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -133,7 +133,7 @@ out:
133static int 133static int
134nfs_closedir(struct inode *inode, struct file *filp) 134nfs_closedir(struct inode *inode, struct file *filp)
135{ 135{
136 put_nfs_open_dir_context(filp->f_path.dentry->d_inode, filp->private_data); 136 put_nfs_open_dir_context(file_inode(filp), filp->private_data);
137 return 0; 137 return 0;
138} 138}
139 139
@@ -499,7 +499,7 @@ void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry)
499 if (IS_ERR(inode)) 499 if (IS_ERR(inode))
500 goto out; 500 goto out;
501 501
502 alias = d_materialise_unique(dentry, inode); 502 alias = d_splice_alias(inode, dentry);
503 if (IS_ERR(alias)) 503 if (IS_ERR(alias))
504 goto out; 504 goto out;
505 else if (alias) { 505 else if (alias) {
@@ -1393,7 +1393,7 @@ struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned in
1393 nfs_advise_use_readdirplus(dir); 1393 nfs_advise_use_readdirplus(dir);
1394 1394
1395no_entry: 1395no_entry:
1396 res = d_materialise_unique(dentry, inode); 1396 res = d_splice_alias(inode, dentry);
1397 if (res != NULL) { 1397 if (res != NULL) {
1398 if (IS_ERR(res)) 1398 if (IS_ERR(res))
1399 goto out_unblock_sillyrename; 1399 goto out_unblock_sillyrename;
diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c
index 880618a8b048..9ac3846cb59e 100644
--- a/fs/nfs/getroot.c
+++ b/fs/nfs/getroot.c
@@ -51,14 +51,14 @@ static int nfs_superblock_set_dummy_root(struct super_block *sb, struct inode *i
51 /* 51 /*
52 * Ensure that this dentry is invisible to d_find_alias(). 52 * Ensure that this dentry is invisible to d_find_alias().
53 * Otherwise, it may be spliced into the tree by 53 * Otherwise, it may be spliced into the tree by
54 * d_materialise_unique if a parent directory from the same 54 * d_splice_alias if a parent directory from the same
55 * filesystem gets mounted at a later time. 55 * filesystem gets mounted at a later time.
56 * This again causes shrink_dcache_for_umount_subtree() to 56 * This again causes shrink_dcache_for_umount_subtree() to
57 * Oops, since the test for IS_ROOT() will fail. 57 * Oops, since the test for IS_ROOT() will fail.
58 */ 58 */
59 spin_lock(&sb->s_root->d_inode->i_lock); 59 spin_lock(&sb->s_root->d_inode->i_lock);
60 spin_lock(&sb->s_root->d_lock); 60 spin_lock(&sb->s_root->d_lock);
61 hlist_del_init(&sb->s_root->d_alias); 61 hlist_del_init(&sb->s_root->d_u.d_alias);
62 spin_unlock(&sb->s_root->d_lock); 62 spin_unlock(&sb->s_root->d_lock);
63 spin_unlock(&sb->s_root->d_inode->i_lock); 63 spin_unlock(&sb->s_root->d_inode->i_lock);
64 } 64 }