diff options
-rw-r--r-- | fs/reiserfs/inode.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 77d6d47abc83..f844533792ee 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -1811,11 +1811,16 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, | |||
1811 | TYPE_STAT_DATA, SD_SIZE, MAX_US_INT); | 1811 | TYPE_STAT_DATA, SD_SIZE, MAX_US_INT); |
1812 | memcpy(INODE_PKEY(inode), &(ih.ih_key), KEY_SIZE); | 1812 | memcpy(INODE_PKEY(inode), &(ih.ih_key), KEY_SIZE); |
1813 | args.dirid = le32_to_cpu(ih.ih_key.k_dir_id); | 1813 | args.dirid = le32_to_cpu(ih.ih_key.k_dir_id); |
1814 | if (insert_inode_locked4(inode, args.objectid, | 1814 | |
1815 | reiserfs_find_actor, &args) < 0) { | 1815 | reiserfs_write_unlock(inode->i_sb); |
1816 | err = insert_inode_locked4(inode, args.objectid, | ||
1817 | reiserfs_find_actor, &args); | ||
1818 | reiserfs_write_lock(inode->i_sb); | ||
1819 | if (err) { | ||
1816 | err = -EINVAL; | 1820 | err = -EINVAL; |
1817 | goto out_bad_inode; | 1821 | goto out_bad_inode; |
1818 | } | 1822 | } |
1823 | |||
1819 | if (old_format_only(sb)) | 1824 | if (old_format_only(sb)) |
1820 | /* not a perfect generation count, as object ids can be reused, but | 1825 | /* not a perfect generation count, as object ids can be reused, but |
1821 | ** this is as good as reiserfs can do right now. | 1826 | ** this is as good as reiserfs can do right now. |