summaryrefslogtreecommitdiffstats
path: root/fs/fat
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-04-02 14:34:06 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-05-29 23:28:33 -0400
commitb0b0382bb4904965a9e9fca77ad87514dfda0d1c (patch)
treedc46873fa74e0d194e4a2571b16f0767e1919ae8 /fs/fat
parent6d42e7e9f6d86ed4dfacde75a6cf515068f9749c (diff)
->encode_fh() API change
pass inode + parent's inode or NULL instead of dentry + bool saying whether we want the parent or not. NOTE: that needs ceph fix folded in. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fat')
-rw-r--r--fs/fat/inode.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index b3d290c1b513..7edfaadc0787 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -752,10 +752,9 @@ static struct dentry *fat_fh_to_dentry(struct super_block *sb,
752} 752}
753 753
754static int 754static int
755fat_encode_fh(struct dentry *de, __u32 *fh, int *lenp, int connectable) 755fat_encode_fh(struct inode *inode, __u32 *fh, int *lenp, struct inode *parent)
756{ 756{
757 int len = *lenp; 757 int len = *lenp;
758 struct inode *inode = de->d_inode;
759 u32 ipos_h, ipos_m, ipos_l; 758 u32 ipos_h, ipos_m, ipos_l;
760 759
761 if (len < 5) { 760 if (len < 5) {
@@ -771,9 +770,9 @@ fat_encode_fh(struct dentry *de, __u32 *fh, int *lenp, int connectable)
771 fh[1] = inode->i_generation; 770 fh[1] = inode->i_generation;
772 fh[2] = ipos_h; 771 fh[2] = ipos_h;
773 fh[3] = ipos_m | MSDOS_I(inode)->i_logstart; 772 fh[3] = ipos_m | MSDOS_I(inode)->i_logstart;
774 spin_lock(&de->d_lock); 773 fh[4] = ipos_l;
775 fh[4] = ipos_l | MSDOS_I(de->d_parent->d_inode)->i_logstart; 774 if (parent)
776 spin_unlock(&de->d_lock); 775 fh[4] |= MSDOS_I(parent)->i_logstart;
777 return 3; 776 return 3;
778} 777}
779 778