diff --git a/[refs] b/[refs] index 04ad730a6c1c..a3afc3151e11 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 05bf9e839d9de4e8a094274a0a2fd07beb47eaf1 +refs/heads/master: ebd3610b110bbb18ea6f9f2aeed1e1068c537227 diff --git a/trunk/fs/ext4/inode.c b/trunk/fs/ext4/inode.c index cbd2ca99d113..51cdd13e1c31 100644 --- a/trunk/fs/ext4/inode.c +++ b/trunk/fs/ext4/inode.c @@ -1368,6 +1368,10 @@ static int ext4_write_begin(struct file *file, struct address_space *mapping, goto out; } + /* We cannot recurse into the filesystem as the transaction is already + * started */ + flags |= AOP_FLAG_NOFS; + page = grab_cache_page_write_begin(mapping, index, flags); if (!page) { ext4_journal_stop(handle); @@ -1377,7 +1381,7 @@ static int ext4_write_begin(struct file *file, struct address_space *mapping, *pagep = page; ret = block_write_begin(file, mapping, pos, len, flags, pagep, fsdata, - ext4_get_block); + ext4_get_block); if (!ret && ext4_should_journal_data(inode)) { ret = walk_page_buffers(handle, page_buffers(page), @@ -2667,6 +2671,9 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping, ret = PTR_ERR(handle); goto out; } + /* We cannot recurse into the filesystem as the transaction is already + * started */ + flags |= AOP_FLAG_NOFS; page = grab_cache_page_write_begin(mapping, index, flags); if (!page) {