Linux-f2fs-devel Archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs: add compat_ioctl to f2fs_dir_operations
@ 2015-05-12  8:05 hujianyang
  2015-05-12  9:54 ` Chao Yu
  0 siblings, 1 reply; 2+ messages in thread
From: hujianyang @ 2015-05-12  8:05 UTC (permalink / raw
  To: Jaegeuk Kim; +Cc: namjae.jeon, linux-f2fs-devel

commit e9750824114ff939d9da299e73651add6aa65456

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)

# busybox chattr +i A
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>
---
 fs/f2fs/dir.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 12f6869..3e92376 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -879,4 +879,7 @@ const struct file_operations f2fs_dir_operations = {
 	.iterate	= f2fs_readdir,
 	.fsync		= f2fs_sync_file,
 	.unlocked_ioctl	= f2fs_ioctl,
+#ifdef CONFIG_COMPAT
+	.compat_ioctl   = f2fs_compat_ioctl,
+#endif
 };
-- 
1.6.0.2



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] f2fs: add compat_ioctl to f2fs_dir_operations
  2015-05-12  8:05 [PATCH] f2fs: add compat_ioctl to f2fs_dir_operations hujianyang
@ 2015-05-12  9:54 ` Chao Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2015-05-12  9:54 UTC (permalink / raw
  To: 'hujianyang', 'Jaegeuk Kim'; +Cc: namjae.jeon, linux-f2fs-devel

Hi Jianyang,

> -----Original Message-----
> From: hujianyang [mailto:hujianyang@huawei.com]
> Sent: Tuesday, May 12, 2015 4:06 PM
> To: Jaegeuk Kim
> Cc: Chao Yu; namjae.jeon@samsung.com; linux-f2fs-devel@lists.sourceforge.net
> Subject: [f2fs-dev][PATCH] f2fs: add compat_ioctl to f2fs_dir_operations
> 
> commit e9750824114ff939d9da299e73651add6aa65456
> 
> 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)
> 
> # busybox chattr +i A
> chattr: reading flags on A: Inappropriate ioctl for device
> 
> This patch copies compat_ioctl from f2fs_file_operations and
> fix this problem.

Looks good to me.

> 
> Signed-off-by: hujianyang <hujianyang@huawei.com>

Reviewed-by: Chao Yu <chao2.yu@samsung.com>



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-12  9:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-12  8:05 [PATCH] f2fs: add compat_ioctl to f2fs_dir_operations hujianyang
2015-05-12  9:54 ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).