Skip to content

Commit

Permalink
logfs: Close i_ino reuse race
Browse files Browse the repository at this point in the history
logfs_seek_hole() may return the same offset it is passed as argument.
Found by Prasad Joshi <prasadjoshi124@gmail.com>

Signed-off-by: Joern Engel <joern@logfs.org>
  • Loading branch information
Joern Engel committed May 1, 2010
1 parent bd2b3f2 commit ccc0197
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/logfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ static void logfs_set_ino_generation(struct super_block *sb,
u64 ino;

mutex_lock(&super->s_journal_mutex);
ino = logfs_seek_hole(super->s_master_inode, super->s_last_ino);
ino = logfs_seek_hole(super->s_master_inode, super->s_last_ino + 1);
super->s_last_ino = ino;
super->s_inos_till_wrap--;
if (super->s_inos_till_wrap < 0) {
Expand Down

0 comments on commit ccc0197

Please sign in to comment.