aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r--fs/gfs2/inode.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index ea9e996f3673..cd1de61bff2f 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -288,7 +288,7 @@ int gfs2_inode_refresh(struct gfs2_inode *ip)
288 * Returns: errno 288 * Returns: errno
289 */ 289 */
290 290
291static int inode_create(struct gfs2_glock *i_gl, struct gfs2_inum *inum, 291static int inode_create(struct gfs2_glock *i_gl, const struct gfs2_inum *inum,
292 struct gfs2_glock *io_gl, unsigned int io_state, 292 struct gfs2_glock *io_gl, unsigned int io_state,
293 struct gfs2_inode **ipp) 293 struct gfs2_inode **ipp)
294{ 294{
@@ -354,8 +354,8 @@ static int inode_create(struct gfs2_glock *i_gl, struct gfs2_inum *inum,
354 * Returns: errno 354 * Returns: errno
355 */ 355 */
356 356
357int gfs2_inode_get(struct gfs2_glock *i_gl, struct gfs2_inum *inum, int create, 357int gfs2_inode_get(struct gfs2_glock *i_gl, const struct gfs2_inum *inum,
358 struct gfs2_inode **ipp) 358 int create, struct gfs2_inode **ipp)
359{ 359{
360 struct gfs2_sbd *sdp = i_gl->gl_sbd; 360 struct gfs2_sbd *sdp = i_gl->gl_sbd;
361 struct gfs2_glock *io_gl; 361 struct gfs2_glock *io_gl;
@@ -718,6 +718,7 @@ int gfs2_change_nlink(struct gfs2_inode *ip, int diff)
718int gfs2_lookupi(struct inode *dir, struct qstr *name, int is_root, 718int gfs2_lookupi(struct inode *dir, struct qstr *name, int is_root,
719 struct inode **inodep) 719 struct inode **inodep)
720{ 720{
721 struct super_block *sb = dir->i_sb;
721 struct gfs2_inode *ipp; 722 struct gfs2_inode *ipp;
722 struct gfs2_inode *dip = dir->u.generic_ip; 723 struct gfs2_inode *dip = dir->u.generic_ip;
723 struct gfs2_sbd *sdp = dip->i_sbd; 724 struct gfs2_sbd *sdp = dip->i_sbd;
@@ -733,7 +734,7 @@ int gfs2_lookupi(struct inode *dir, struct qstr *name, int is_root,
733 return -ENAMETOOLONG; 734 return -ENAMETOOLONG;
734 735
735 if (gfs2_filecmp(name, ".", 1) || 736 if (gfs2_filecmp(name, ".", 1) ||
736 (gfs2_filecmp(name, "..", 2) && dir == sdp->sd_root_dir)) { 737 (gfs2_filecmp(name, "..", 2) && dir == sb->s_root->d_inode)) {
737 gfs2_inode_hold(dip); 738 gfs2_inode_hold(dip);
738 ipp = dip; 739 ipp = dip;
739 goto done; 740 goto done;
@@ -1466,8 +1467,8 @@ int gfs2_unlink_ok(struct gfs2_inode *dip, struct qstr *name,
1466 1467
1467int gfs2_ok_to_move(struct gfs2_inode *this, struct gfs2_inode *to) 1468int gfs2_ok_to_move(struct gfs2_inode *this, struct gfs2_inode *to)
1468{ 1469{
1469 struct gfs2_sbd *sdp = this->i_sbd;
1470 struct inode *dir = to->i_vnode; 1470 struct inode *dir = to->i_vnode;
1471 struct super_block *sb = dir->i_sb;
1471 struct inode *tmp; 1472 struct inode *tmp;
1472 struct qstr dotdot; 1473 struct qstr dotdot;
1473 int error = 0; 1474 int error = 0;
@@ -1483,7 +1484,7 @@ int gfs2_ok_to_move(struct gfs2_inode *this, struct gfs2_inode *to)
1483 error = -EINVAL; 1484 error = -EINVAL;
1484 break; 1485 break;
1485 } 1486 }
1486 if (dir == sdp->sd_root_dir) { 1487 if (dir == sb->s_root->d_inode) {
1487 error = 0; 1488 error = 0;
1488 break; 1489 break;
1489 } 1490 }