aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/lustre/lustre/llite/namei.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c
index 9ea878238b62..02283c533f5b 100644
--- a/drivers/staging/lustre/lustre/llite/namei.c
+++ b/drivers/staging/lustre/lustre/llite/namei.c
@@ -54,27 +54,6 @@
54static int ll_create_it(struct inode *, struct dentry *, 54static int ll_create_it(struct inode *, struct dentry *,
55 int, struct lookup_intent *); 55 int, struct lookup_intent *);
56 56
57/*
58 * Check if we have something mounted at the named dchild.
59 * In such a case there would always be dentry present.
60 */
61static int ll_d_mountpoint(struct dentry *dparent, struct dentry *dchild,
62 struct qstr *name)
63{
64 int mounted = 0;
65
66 if (unlikely(dchild)) {
67 mounted = d_mountpoint(dchild);
68 } else if (dparent) {
69 dchild = d_lookup(dparent, name);
70 if (dchild) {
71 mounted = d_mountpoint(dchild);
72 dput(dchild);
73 }
74 }
75 return mounted;
76}
77
78/* called from iget5_locked->find_inode() under inode_hash_lock spinlock */ 57/* called from iget5_locked->find_inode() under inode_hash_lock spinlock */
79static int ll_test_inode(struct inode *inode, void *opaque) 58static int ll_test_inode(struct inode *inode, void *opaque)
80{ 59{
@@ -1003,13 +982,6 @@ static int ll_unlink(struct inode * dir, struct dentry *dentry)
1003 CDEBUG(D_VFSTRACE, "VFS Op:name=%pd,dir=%lu/%u(%p)\n", 982 CDEBUG(D_VFSTRACE, "VFS Op:name=%pd,dir=%lu/%u(%p)\n",
1004 dentry, dir->i_ino, dir->i_generation, dir); 983 dentry, dir->i_ino, dir->i_generation, dir);
1005 984
1006 /*
1007 * XXX: unlink bind mountpoint maybe call to here,
1008 * just check it as vfs_unlink does.
1009 */
1010 if (unlikely(ll_d_mountpoint(NULL, dentry, &dentry->d_name)))
1011 return -EBUSY;
1012
1013 op_data = ll_prep_md_op_data(NULL, dir, NULL, 985 op_data = ll_prep_md_op_data(NULL, dir, NULL,
1014 dentry->d_name.name, 986 dentry->d_name.name,
1015 dentry->d_name.len, 987 dentry->d_name.len,
@@ -1060,9 +1032,6 @@ static int ll_rmdir(struct inode *dir, struct dentry *dentry)
1060 CDEBUG(D_VFSTRACE, "VFS Op:name=%pd,dir=%lu/%u(%p)\n", 1032 CDEBUG(D_VFSTRACE, "VFS Op:name=%pd,dir=%lu/%u(%p)\n",
1061 dentry, dir->i_ino, dir->i_generation, dir); 1033 dentry, dir->i_ino, dir->i_generation, dir);
1062 1034
1063 if (unlikely(ll_d_mountpoint(NULL, dentry, &dentry->d_name)))
1064 return -EBUSY;
1065
1066 op_data = ll_prep_md_op_data(NULL, dir, NULL, 1035 op_data = ll_prep_md_op_data(NULL, dir, NULL,
1067 dentry->d_name.name, 1036 dentry->d_name.name,
1068 dentry->d_name.len, 1037 dentry->d_name.len,
@@ -1147,10 +1116,6 @@ static int ll_rename(struct inode *old_dir, struct dentry *old_dentry,
1147 old_dir->i_ino, old_dir->i_generation, old_dir, new_dentry, 1116 old_dir->i_ino, old_dir->i_generation, old_dir, new_dentry,
1148 new_dir->i_ino, new_dir->i_generation, new_dir); 1117 new_dir->i_ino, new_dir->i_generation, new_dir);
1149 1118
1150 if (unlikely(ll_d_mountpoint(NULL, old_dentry, &old_dentry->d_name) ||
1151 ll_d_mountpoint(NULL, new_dentry, &new_dentry->d_name)))
1152 return -EBUSY;
1153
1154 op_data = ll_prep_md_op_data(NULL, old_dir, new_dir, NULL, 0, 0, 1119 op_data = ll_prep_md_op_data(NULL, old_dir, new_dir, NULL, 0, 0,
1155 LUSTRE_OPC_ANY, NULL); 1120 LUSTRE_OPC_ANY, NULL);
1156 if (IS_ERR(op_data)) 1121 if (IS_ERR(op_data))