linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] vfs: call file_ioctl call for directories.
@ 2009-04-15 14:39 Aneesh Kumar K.V
  2009-04-15 14:39 ` [PATCH 2/2] ext4: hook fiemap operation " Aneesh Kumar K.V
  2009-05-02 23:06 ` [PATCH 1/2] vfs: call file_ioctl call " Theodore Tso
  0 siblings, 2 replies; 7+ messages in thread
From: Aneesh Kumar K.V @ 2009-04-15 14:39 UTC (permalink / raw)
  To: cmm, tytso, sandeen; +Cc: linux-ext4, Aneesh Kumar K.V

Most of the ioctl callback in file_ioctl should be done even
for directories. For ext4 fiemap should work even for directories.
Similarly FIGETBSZ  should work for directories. For bmap filefrag command
doesn't do the ioctl if the type is not a regular file.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

---
 fs/ioctl.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/ioctl.c b/fs/ioctl.c
index ac2d47e..328b533 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -523,7 +523,8 @@ int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
 		break;
 
 	default:
-		if (S_ISREG(filp->f_path.dentry->d_inode->i_mode))
+		if (S_ISDIR(filp->f_path.dentry->d_inode->i_mode) ||
+		    S_ISREG(filp->f_path.dentry->d_inode->i_mode))
 			error = file_ioctl(filp, cmd, arg);
 		else
 			error = vfs_ioctl(filp, cmd, arg);
-- 
tg: (0882e8d..) dir_fiemap (depends on: master)

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

end of thread, other threads:[~2009-05-13 22:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-15 14:39 [PATCH 1/2] vfs: call file_ioctl call for directories Aneesh Kumar K.V
2009-04-15 14:39 ` [PATCH 2/2] ext4: hook fiemap operation " Aneesh Kumar K.V
2009-05-02 23:06   ` Theodore Tso
2009-05-02 23:06 ` [PATCH 1/2] vfs: call file_ioctl call " Theodore Tso
2009-05-03 20:30   ` Theodore Tso
2009-05-04  9:02     ` [PATCH -V2] vfs: Enable FS_IOC_FIEMAP and FIGETBSZ for all filetypes Aneesh Kumar K.V
2009-05-13 22:42       ` Theodore Tso

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 NNTP newsgroup(s).