aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fat
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-03-28 13:03:58 +0200
committerTakashi Iwai <tiwai@suse.de>2011-03-28 13:03:58 +0200
commitcdccfc8dc0bf62a1da327324a8d639139acc9279 (patch)
treedca7934b27d510c9c006558979ebc48e07a531cf /fs/fat
parentb21a8ee67013372f439fbd1591e91d09de49bb9c (diff)
parentc6b358748e19ce7e230b0926ac42696bc485a562 (diff)
downloadkernel_samsung_smdk4412-cdccfc8dc0bf62a1da327324a8d639139acc9279.zip
kernel_samsung_smdk4412-cdccfc8dc0bf62a1da327324a8d639139acc9279.tar.gz
kernel_samsung_smdk4412-cdccfc8dc0bf62a1da327324a8d639139acc9279.tar.bz2
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'fs/fat')
-rw-r--r--fs/fat/inode.c5
-rw-r--r--fs/fat/namei_vfat.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 86753fe..8d68690 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -236,7 +236,6 @@ static const struct address_space_operations fat_aops = {
.readpages = fat_readpages,
.writepage = fat_writepage,
.writepages = fat_writepages,
- .sync_page = block_sync_page,
.write_begin = fat_write_begin,
.write_end = fat_write_end,
.direct_IO = fat_direct_IO,
@@ -757,8 +756,10 @@ fat_encode_fh(struct dentry *de, __u32 *fh, int *lenp, int connectable)
struct inode *inode = de->d_inode;
u32 ipos_h, ipos_m, ipos_l;
- if (len < 5)
+ if (len < 5) {
+ *lenp = 5;
return 255; /* no room */
+ }
ipos_h = MSDOS_I(inode)->i_pos >> 8;
ipos_m = (MSDOS_I(inode)->i_pos & 0xf0) << 24;
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c
index f88f752..adae3fb 100644
--- a/fs/fat/namei_vfat.c
+++ b/fs/fat/namei_vfat.c
@@ -43,7 +43,7 @@ static int vfat_revalidate_shortname(struct dentry *dentry)
static int vfat_revalidate(struct dentry *dentry, struct nameidata *nd)
{
- if (nd->flags & LOOKUP_RCU)
+ if (nd && nd->flags & LOOKUP_RCU)
return -ECHILD;
/* This is not negative dentry. Always valid. */
@@ -54,7 +54,7 @@ static int vfat_revalidate(struct dentry *dentry, struct nameidata *nd)
static int vfat_revalidate_ci(struct dentry *dentry, struct nameidata *nd)
{
- if (nd->flags & LOOKUP_RCU)
+ if (nd && nd->flags & LOOKUP_RCU)
return -ECHILD;
/*