aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-01-11 03:14:47 -0500
committerEric Van Hensbergen <ericvh@gmail.com>2011-01-11 10:58:08 -0500
commitb8b80cf37c7f0e32729262f805bc0fa81c3e9d12 (patch)
tree234c3ddfa7524ba154bc4e40c780e94262d4da8c /fs/9p
parentc25a61f542ccb81e74d3f822992f3d74392f386d (diff)
fs/9p: Don't set dentry->d_op in create routines
We do set dentry->d_op in lookup even in case of EOENT entries. That implies we should have dentry->d_op already set when create/mkdir/mknod/link/symlink routines are called Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/vfs_inode.c6
-rw-r--r--fs/9p/vfs_inode_dotl.c13
2 files changed, 0 insertions, 19 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 392358672483..5076eeb95502 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -537,12 +537,6 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir,
537 P9_DPRINTK(P9_DEBUG_VFS, "inode creation failed %d\n", err); 537 P9_DPRINTK(P9_DEBUG_VFS, "inode creation failed %d\n", err);
538 goto error; 538 goto error;
539 } 539 }
540
541 if (v9ses->cache)
542 d_set_d_op(dentry, &v9fs_cached_dentry_operations);
543 else
544 d_set_d_op(dentry, &v9fs_dentry_operations);
545
546 d_instantiate(dentry, inode); 540 d_instantiate(dentry, inode);
547 err = v9fs_fid_add(dentry, fid); 541 err = v9fs_fid_add(dentry, fid);
548 if (err < 0) 542 if (err < 0)
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index ee3ae9b5afdd..fe3ffa9aace4 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -211,11 +211,6 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode,
211 P9_DPRINTK(P9_DEBUG_VFS, "inode creation failed %d\n", err); 211 P9_DPRINTK(P9_DEBUG_VFS, "inode creation failed %d\n", err);
212 goto error; 212 goto error;
213 } 213 }
214 if (v9ses->cache)
215 dentry->d_op = &v9fs_cached_dentry_operations;
216 else
217 dentry->d_op = &v9fs_dentry_operations;
218
219 d_instantiate(dentry, inode); 214 d_instantiate(dentry, inode);
220 err = v9fs_fid_add(dentry, fid); 215 err = v9fs_fid_add(dentry, fid);
221 if (err < 0) 216 if (err < 0)
@@ -312,7 +307,6 @@ static int v9fs_vfs_mkdir_dotl(struct inode *dir,
312 err); 307 err);
313 goto error; 308 goto error;
314 } 309 }
315 d_set_d_op(dentry, &v9fs_cached_dentry_operations);
316 d_instantiate(dentry, inode); 310 d_instantiate(dentry, inode);
317 err = v9fs_fid_add(dentry, fid); 311 err = v9fs_fid_add(dentry, fid);
318 if (err < 0) 312 if (err < 0)
@@ -329,7 +323,6 @@ static int v9fs_vfs_mkdir_dotl(struct inode *dir,
329 err = PTR_ERR(inode); 323 err = PTR_ERR(inode);
330 goto error; 324 goto error;
331 } 325 }
332 d_set_d_op(dentry, &v9fs_dentry_operations);
333 d_instantiate(dentry, inode); 326 d_instantiate(dentry, inode);
334 } 327 }
335 /* Now set the ACL based on the default value */ 328 /* Now set the ACL based on the default value */
@@ -560,7 +553,6 @@ v9fs_vfs_symlink_dotl(struct inode *dir, struct dentry *dentry,
560 err); 553 err);
561 goto error; 554 goto error;
562 } 555 }
563 d_set_d_op(dentry, &v9fs_cached_dentry_operations);
564 d_instantiate(dentry, inode); 556 d_instantiate(dentry, inode);
565 err = v9fs_fid_add(dentry, fid); 557 err = v9fs_fid_add(dentry, fid);
566 if (err < 0) 558 if (err < 0)
@@ -573,7 +565,6 @@ v9fs_vfs_symlink_dotl(struct inode *dir, struct dentry *dentry,
573 err = PTR_ERR(inode); 565 err = PTR_ERR(inode);
574 goto error; 566 goto error;
575 } 567 }
576 d_set_d_op(dentry, &v9fs_dentry_operations);
577 d_instantiate(dentry, inode); 568 d_instantiate(dentry, inode);
578 } 569 }
579 570
@@ -648,8 +639,6 @@ v9fs_vfs_link_dotl(struct dentry *old_dentry, struct inode *dir,
648 */ 639 */
649 ihold(old_dentry->d_inode); 640 ihold(old_dentry->d_inode);
650 } 641 }
651
652 d_set_d_op(dentry, old_dentry->d_op);
653 d_instantiate(dentry, old_dentry->d_inode); 642 d_instantiate(dentry, old_dentry->d_inode);
654 643
655 return err; 644 return err;
@@ -728,7 +717,6 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, int omode,
728 err); 717 err);
729 goto error; 718 goto error;
730 } 719 }
731 d_set_d_op(dentry, &v9fs_cached_dentry_operations);
732 d_instantiate(dentry, inode); 720 d_instantiate(dentry, inode);
733 err = v9fs_fid_add(dentry, fid); 721 err = v9fs_fid_add(dentry, fid);
734 if (err < 0) 722 if (err < 0)
@@ -744,7 +732,6 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, int omode,
744 err = PTR_ERR(inode); 732 err = PTR_ERR(inode);
745 goto error; 733 goto error;
746 } 734 }
747 d_set_d_op(dentry, &v9fs_dentry_operations);
748 d_instantiate(dentry, inode); 735 d_instantiate(dentry, inode);
749 } 736 }
750 /* Now set the ACL based on the default value */ 737 /* Now set the ACL based on the default value */