aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext2')
-rw-r--r--fs/ext2/namei.c8
-rw-r--r--fs/ext2/super.c6
2 files changed, 10 insertions, 4 deletions
diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c
index f663a67d7bf0..73b0d9519836 100644
--- a/fs/ext2/namei.c
+++ b/fs/ext2/namei.c
@@ -41,8 +41,8 @@ static inline int ext2_add_nondir(struct dentry *dentry, struct inode *inode)
41{ 41{
42 int err = ext2_add_link(dentry, inode); 42 int err = ext2_add_link(dentry, inode);
43 if (!err) { 43 if (!err) {
44 d_instantiate(dentry, inode);
45 unlock_new_inode(inode); 44 unlock_new_inode(inode);
45 d_instantiate(dentry, inode);
46 return 0; 46 return 0;
47 } 47 }
48 inode_dec_link_count(inode); 48 inode_dec_link_count(inode);
@@ -55,7 +55,7 @@ static inline int ext2_add_nondir(struct dentry *dentry, struct inode *inode)
55 * Methods themselves. 55 * Methods themselves.
56 */ 56 */
57 57
58static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd) 58static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, unsigned int flags)
59{ 59{
60 struct inode * inode; 60 struct inode * inode;
61 ino_t ino; 61 ino_t ino;
@@ -94,7 +94,7 @@ struct dentry *ext2_get_parent(struct dentry *child)
94 * If the create succeeds, we fill in the inode information 94 * If the create succeeds, we fill in the inode information
95 * with d_instantiate(). 95 * with d_instantiate().
96 */ 96 */
97static int ext2_create (struct inode * dir, struct dentry * dentry, umode_t mode, struct nameidata *nd) 97static int ext2_create (struct inode * dir, struct dentry * dentry, umode_t mode, bool excl)
98{ 98{
99 struct inode *inode; 99 struct inode *inode;
100 100
@@ -242,8 +242,8 @@ static int ext2_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode)
242 if (err) 242 if (err)
243 goto out_fail; 243 goto out_fail;
244 244
245 d_instantiate(dentry, inode);
246 unlock_new_inode(inode); 245 unlock_new_inode(inode);
246 d_instantiate(dentry, inode);
247out: 247out:
248 return err; 248 return err;
249 249
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index b3621cb7ea31..5df3d2d8169c 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -1184,6 +1184,12 @@ static int ext2_sync_fs(struct super_block *sb, int wait)
1184 struct ext2_sb_info *sbi = EXT2_SB(sb); 1184 struct ext2_sb_info *sbi = EXT2_SB(sb);
1185 struct ext2_super_block *es = EXT2_SB(sb)->s_es; 1185 struct ext2_super_block *es = EXT2_SB(sb)->s_es;
1186 1186
1187 /*
1188 * Write quota structures to quota file, sync_blockdev() will write
1189 * them to disk later
1190 */
1191 dquot_writeback_dquots(sb, -1);
1192
1187 spin_lock(&sbi->s_lock); 1193 spin_lock(&sbi->s_lock);
1188 if (es->s_state & cpu_to_le16(EXT2_VALID_FS)) { 1194 if (es->s_state & cpu_to_le16(EXT2_VALID_FS)) {
1189 ext2_debug("setting valid to 0\n"); 1195 ext2_debug("setting valid to 0\n");