Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108876
b: refs/heads/master
c: 5f22ca9
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Aug 20, 2008
1 parent 2d12224 commit f5c2bb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 395c68464cffbc645919a93d6111bc15201167f3
refs/heads/master: 5f22ca9b13551debea77a407a8d06cd9c6f15238
10 changes: 3 additions & 7 deletions trunk/fs/fat/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,26 +562,23 @@ static int fat_write_inode(struct inode *inode, int wait)
struct buffer_head *bh;
struct msdos_dir_entry *raw_entry;
loff_t i_pos;
int err = 0;
int err;

retry:
i_pos = MSDOS_I(inode)->i_pos;
if (inode->i_ino == MSDOS_ROOT_INO || !i_pos)
return 0;

lock_super(sb);
bh = sb_bread(sb, i_pos >> sbi->dir_per_block_bits);
if (!bh) {
printk(KERN_ERR "FAT: unable to read inode block "
"for updating (i_pos %lld)\n", i_pos);
err = -EIO;
goto out;
return -EIO;
}
spin_lock(&sbi->inode_hash_lock);
if (i_pos != MSDOS_I(inode)->i_pos) {
spin_unlock(&sbi->inode_hash_lock);
brelse(bh);
unlock_super(sb);
goto retry;
}

Expand All @@ -607,11 +604,10 @@ static int fat_write_inode(struct inode *inode, int wait)
}
spin_unlock(&sbi->inode_hash_lock);
mark_buffer_dirty(bh);
err = 0;
if (wait)
err = sync_dirty_buffer(bh);
brelse(bh);
out:
unlock_super(sb);
return err;
}

Expand Down

0 comments on commit f5c2bb3

Please sign in to comment.