aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exofs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exofs/inode.c')
-rw-r--r--fs/exofs/inode.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index 01fa798e8fdb..7bc71a7d30a8 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -908,6 +908,12 @@ out:
908 return ret; 908 return ret;
909} 909}
910 910
911
912static void __oi_init(struct exofs_i_info *oi)
913{
914 init_waitqueue_head(&oi->i_wq);
915 oi->i_flags = 0;
916}
911/* 917/*
912 * Fill in an inode read from the OSD and set it up for use 918 * Fill in an inode read from the OSD and set it up for use
913 */ 919 */
@@ -925,13 +931,13 @@ struct inode *exofs_iget(struct super_block *sb, unsigned long ino)
925 if (!(inode->i_state & I_NEW)) 931 if (!(inode->i_state & I_NEW))
926 return inode; 932 return inode;
927 oi = exofs_i(inode); 933 oi = exofs_i(inode);
934 __oi_init(oi);
928 935
929 /* read the inode from the osd */ 936 /* read the inode from the osd */
930 ret = exofs_get_inode(sb, oi, &fcb, &sanity); 937 ret = exofs_get_inode(sb, oi, &fcb, &sanity);
931 if (ret) 938 if (ret)
932 goto bad_inode; 939 goto bad_inode;
933 940
934 init_waitqueue_head(&oi->i_wq);
935 set_obj_created(oi); 941 set_obj_created(oi);
936 942
937 /* copy stuff from on-disk struct to in-memory struct */ 943 /* copy stuff from on-disk struct to in-memory struct */
@@ -1062,8 +1068,8 @@ struct inode *exofs_new_inode(struct inode *dir, int mode)
1062 return ERR_PTR(-ENOMEM); 1068 return ERR_PTR(-ENOMEM);
1063 1069
1064 oi = exofs_i(inode); 1070 oi = exofs_i(inode);
1071 __oi_init(oi);
1065 1072
1066 init_waitqueue_head(&oi->i_wq);
1067 set_obj_2bcreated(oi); 1073 set_obj_2bcreated(oi);
1068 1074
1069 sbi = sb->s_fs_info; 1075 sbi = sb->s_fs_info;