mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, hirofumi@mail.parknet.co.jp,
	bunk@kernel.org
Subject: [PATCH 3/7] fat/dir.c: switch to struct __fat_dirent
Date: Tue, 01 Jul 2008 11:57:03 +0900	[thread overview]
Message-ID: <d3ce91fd3e848699cff311608.ps@mail.parknet.co.jp> (raw)
In-Reply-To: <129170883e848699cff211608.ps@mail.parknet.co.jp>


struct __fat_dirent is what was formerly the kernel struct dirent
(that was different from the userspace struct dirent).

Converting all fat users to struct __fat_dirent will allow us to get 
rid of the conflicting struct dirent definition.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
---

 fs/fat/dir.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff -puN fs/fat/dir.c~fat_use-fat_fs_dirent fs/fat/dir.c
--- linux-2.6/fs/fat/dir.c~fat_use-fat_fs_dirent	2008-07-01 09:50:49.000000000 +0900
+++ linux-2.6-hirofumi/fs/fat/dir.c	2008-07-01 11:34:35.000000000 +0900
@@ -17,7 +17,6 @@
 #include <linux/slab.h>
 #include <linux/time.h>
 #include <linux/msdos_fs.h>
-#include <linux/dirent.h>
 #include <linux/smp_lock.h>
 #include <linux/buffer_head.h>
 #include <linux/compat.h>
@@ -715,7 +714,7 @@ efault:									   \
 	return -EFAULT;							   \
 }
 
-FAT_IOCTL_FILLDIR_FUNC(fat_ioctl_filldir, dirent)
+FAT_IOCTL_FILLDIR_FUNC(fat_ioctl_filldir, __fat_dirent)
 
 static int fat_ioctl_readdir(struct inode *inode, struct file *filp,
 			     void __user *dirent, filldir_t filldir,
@@ -741,7 +740,7 @@ static int fat_ioctl_readdir(struct inod
 static int fat_dir_ioctl(struct inode *inode, struct file *filp,
 			 unsigned int cmd, unsigned long arg)
 {
-	struct dirent __user *d1 = (struct dirent __user *)arg;
+	struct __fat_dirent __user *d1 = (struct __fat_dirent __user *)arg;
 	int short_only, both;
 
 	switch (cmd) {
@@ -757,7 +756,7 @@ static int fat_dir_ioctl(struct inode *i
 		return fat_generic_ioctl(inode, filp, cmd, arg);
 	}
 
-	if (!access_ok(VERIFY_WRITE, d1, sizeof(struct dirent[2])))
+	if (!access_ok(VERIFY_WRITE, d1, sizeof(struct __fat_dirent[2])))
 		return -EFAULT;
 	/*
 	 * Yes, we don't need this put_user() absolutely. However old
_

  reply	other threads:[~2008-07-01  2:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-01  2:57 [PATCH 1/7] fat: Fix parse_options() OGAWA Hirofumi
2008-07-01  2:57 ` [PATCH 2/7] fat: Fix VFAT_IOCTL_READDIR_xxx and cleanup for userland OGAWA Hirofumi
2008-07-01  2:57   ` OGAWA Hirofumi [this message]
2008-07-01  2:57     ` [PATCH 4/7] fat: cleanup fs/fat/dir.c OGAWA Hirofumi
2008-07-01  2:57       ` [PATCH 5/7] fat: use same logic in fat_search_long() and __fat_readdir() OGAWA Hirofumi
2008-07-01  2:57         ` [PATCH 6/7] fat: small optimaize __fat_readdir() OGAWA Hirofumi
2008-07-01  2:57           ` [PATCH 7/7] Fix the case of jiffies wrapping in mm/pdflush.c OGAWA Hirofumi
2008-07-01  3:34             ` Andrew Morton
2008-07-01  4:05               ` OGAWA Hirofumi
2008-07-01 12:22       ` [PATCH 4/7] fat: cleanup fs/fat/dir.c Christoph Hellwig
2008-07-01 14:16         ` OGAWA Hirofumi
2008-07-01  3:32     ` [PATCH 3/7] fat/dir.c: switch to struct __fat_dirent Andrew Morton
2008-07-01  3:54       ` OGAWA Hirofumi
2008-07-01  7:40   ` [PATCH 2/7] fat: Fix VFAT_IOCTL_READDIR_xxx and cleanup for userland Christoph Hellwig
2008-07-01  8:33     ` OGAWA Hirofumi
2008-07-01 11:22     ` Adrian Bunk
2008-07-01 12:18       ` Christoph Hellwig
2008-07-01 12:20   ` Christoph Hellwig
2008-07-01 13:15     ` OGAWA Hirofumi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d3ce91fd3e848699cff311608.ps@mail.parknet.co.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=akpm@linux-foundation.org \
    --cc=bunk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome