summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-08-18 14:41:11 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2014-08-21 13:57:03 -0700
commitec4e7af4ca04ff81f786554d670876f1037a9ded (patch)
tree426d51ea2b273bf45ed1ac7411657b55f8cf3af0 /fs
parent202095a7a0ec075b924cb15dde330bf76e485f61 (diff)
downloadlinux-stable-ec4e7af4ca04ff81f786554d670876f1037a9ded.tar.gz
linux-stable-ec4e7af4ca04ff81f786554d670876f1037a9ded.tar.bz2
linux-stable-ec4e7af4ca04ff81f786554d670876f1037a9ded.zip
f2fs: skip if inline_data was converted already
This patch checks inline_data one more time under the inode page lock whether its inline_data is converted or not. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/inline.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index 4d1f39f4583c..3e8ecdf3742b 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -68,7 +68,7 @@ out:
static int __f2fs_convert_inline_data(struct inode *inode, struct page *page)
{
- int err;
+ int err = 0;
struct page *ipage;
struct dnode_of_data dn;
void *src_addr, *dst_addr;
@@ -86,6 +86,10 @@ static int __f2fs_convert_inline_data(struct inode *inode, struct page *page)
goto out;
}
+ /* someone else converted inline_data already */
+ if (!f2fs_has_inline_data(inode))
+ goto out;
+
/*
* i_addr[0] is not used for inline data,
* so reserving new block will not destroy inline data