浏览代码

f2fs: add compat_ioctl to provide backward compatability

introduce compat_ioctl to regular files, but doesn't add this
functionality to f2fs_dir_operations.

While running a 32-bit busybox, I met an error like this:
(A is a directory)

chattr: reading flags on A: Inappropriate ioctl for device

This patch copies compat_ioctl from f2fs_file_operations and
fix this problem.

Signed-off-by: hujianyang <hujianyang@huawei.com>
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
hujianyang 10 年之前
父节点
当前提交
08b95126c7
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      fs/f2fs/dir.c

+ 3 - 0
fs/f2fs/dir.c

@@ -879,4 +879,7 @@ const struct file_operations f2fs_dir_operations = {
 	.iterate	= f2fs_readdir,
 	.iterate	= f2fs_readdir,
 	.fsync		= f2fs_sync_file,
 	.fsync		= f2fs_sync_file,
 	.unlocked_ioctl	= f2fs_ioctl,
 	.unlocked_ioctl	= f2fs_ioctl,
+#ifdef CONFIG_COMPAT
+	.compat_ioctl   = f2fs_compat_ioctl,
+#endif
 };
 };