2008-12-27 20:24:08

by OGAWA Hirofumi

[permalink] [raw]
Subject: [PATCH] Review request for fatfs-2.6.git

The following patches was added to

git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6.git

recently, and are going to merge at next window. Please review.

Christoph Hellwig (1):
fat: make sure to set d_ops in fat_get_parent

OGAWA Hirofumi (2):
fat: drop negative dentry on rename() path
fat: fix duplicate addition of ->llseek handler

fs/fat/dir.c | 1 -
fs/fat/inode.c | 2 ++
fs/fat/namei_vfat.c | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)


2008-12-27 20:23:49

by OGAWA Hirofumi

[permalink] [raw]
Subject: [PATCH] fat: fix duplicate addition of ->llseek handler

Signed-off-by: OGAWA Hirofumi <[email protected]>
---
fs/fat/dir.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/fs/fat/dir.c b/fs/fat/dir.c
index 67e0583..3a7f603 100644
--- a/fs/fat/dir.c
+++ b/fs/fat/dir.c
@@ -841,7 +841,6 @@ const struct file_operations fat_dir_operations = {
.compat_ioctl = fat_compat_dir_ioctl,
#endif
.fsync = file_fsync,
- .llseek = generic_file_llseek,
};

static int fat_get_short_entry(struct inode *dir, loff_t *pos,
--
1.6.0.5.dirty

2008-12-27 20:28:49

by OGAWA Hirofumi

[permalink] [raw]
Subject: [PATCH] fat: drop negative dentry on rename() path

Drop the negative dentry on rename() path, in order to make sure to
use the case sensitive name which is specified by user if this is for
creation.

For it, this uses newly added LOOKUP_RENAME_TARGET like LOOKUP_CREATE.

Signed-off-by: OGAWA Hirofumi <[email protected]>
---
fs/fat/namei_vfat.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c
index bf326d4..8ae32e3 100644
--- a/fs/fat/namei_vfat.c
+++ b/fs/fat/namei_vfat.c
@@ -78,7 +78,7 @@ static int vfat_revalidate_ci(struct dentry *dentry, struct nameidata *nd)
* for creation.
*/
if (!(nd->flags & (LOOKUP_CONTINUE | LOOKUP_PARENT))) {
- if (nd->flags & LOOKUP_CREATE)
+ if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
return 0;
}

--
1.6.0.5.dirty

2008-12-27 20:29:08

by OGAWA Hirofumi

[permalink] [raw]
Subject: [PATCH] fat: make sure to set d_ops in fat_get_parent

From: Christoph Hellwig <[email protected]>

fat_get_parent needs to setup the dentry operations, otherwise we might
lose them when the NFS server needs to reconnect out of cache inodes.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: OGAWA Hirofumi <[email protected]>
---
fs/fat/inode.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index bdd8fb7..37a8af1 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -749,6 +749,8 @@ static struct dentry *fat_get_parent(struct dentry *child)
brelse(bh);

parent = d_obtain_alias(inode);
+ if (!IS_ERR(parent))
+ parent->d_op = sb->s_root->d_op;
out:
unlock_super(sb);

--
1.6.0.5.dirty