f2fs: don't allow atomic writes for not regular files

The atomic writes only supports regular files for database.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 3212dfa..2cf16ed 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -1518,6 +1518,9 @@
 	if (!inode_owner_or_capable(inode))
 		return -EACCES;
 
+	if (!S_ISREG(inode->i_mode))
+		return -EINVAL;
+
 	ret = mnt_want_write_file(filp);
 	if (ret)
 		return ret;