[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1239806343-14219-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
Date: Wed, 15 Apr 2009 20:09:02 +0530
From: "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
To: cmm@...ibm.com, tytso@....edu, sandeen@...hat.com
Cc: linux-ext4@...r.kernel.org,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Subject: [PATCH 1/2] vfs: call file_ioctl call for directories.
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@...ux.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)
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists