diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-04-02 14:34:06 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-29 23:28:33 -0400 |
commit | b0b0382bb4904965a9e9fca77ad87514dfda0d1c (patch) | |
tree | dc46873fa74e0d194e4a2571b16f0767e1919ae8 /mm | |
parent | 6d42e7e9f6d86ed4dfacde75a6cf515068f9749c (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 'mm')
-rw-r--r-- | mm/cleancache.c | 6 | ||||
-rw-r--r-- | mm/shmem.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/mm/cleancache.c b/mm/cleancache.c index 5646c740f613..32e6f4136fa2 100644 --- a/mm/cleancache.c +++ b/mm/cleancache.c | |||
@@ -80,7 +80,7 @@ EXPORT_SYMBOL(__cleancache_init_shared_fs); | |||
80 | static int cleancache_get_key(struct inode *inode, | 80 | static int cleancache_get_key(struct inode *inode, |
81 | struct cleancache_filekey *key) | 81 | struct cleancache_filekey *key) |
82 | { | 82 | { |
83 | int (*fhfn)(struct dentry *, __u32 *fh, int *, int); | 83 | int (*fhfn)(struct inode *, __u32 *fh, int *, struct inode *); |
84 | int len = 0, maxlen = CLEANCACHE_KEY_MAX; | 84 | int len = 0, maxlen = CLEANCACHE_KEY_MAX; |
85 | struct super_block *sb = inode->i_sb; | 85 | struct super_block *sb = inode->i_sb; |
86 | 86 | ||
@@ -88,9 +88,7 @@ static int cleancache_get_key(struct inode *inode, | |||
88 | if (sb->s_export_op != NULL) { | 88 | if (sb->s_export_op != NULL) { |
89 | fhfn = sb->s_export_op->encode_fh; | 89 | fhfn = sb->s_export_op->encode_fh; |
90 | if (fhfn) { | 90 | if (fhfn) { |
91 | struct dentry d; | 91 | len = (*fhfn)(inode, &key->u.fh[0], &maxlen, NULL); |
92 | d.d_inode = inode; | ||
93 | len = (*fhfn)(&d, &key->u.fh[0], &maxlen, 0); | ||
94 | if (len <= 0 || len == 255) | 92 | if (len <= 0 || len == 255) |
95 | return -1; | 93 | return -1; |
96 | if (maxlen > CLEANCACHE_KEY_MAX) | 94 | if (maxlen > CLEANCACHE_KEY_MAX) |
diff --git a/mm/shmem.c b/mm/shmem.c index be5af34a070d..3711422c3172 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -2033,11 +2033,9 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb, | |||
2033 | return dentry; | 2033 | return dentry; |
2034 | } | 2034 | } |
2035 | 2035 | ||
2036 | static int shmem_encode_fh(struct dentry *dentry, __u32 *fh, int *len, | 2036 | static int shmem_encode_fh(struct inode *inode, __u32 *fh, int *len, |
2037 | int connectable) | 2037 | struct inode *parent) |
2038 | { | 2038 | { |
2039 | struct inode *inode = dentry->d_inode; | ||
2040 | |||
2041 | if (*len < 3) { | 2039 | if (*len < 3) { |
2042 | *len = 3; | 2040 | *len = 3; |
2043 | return 255; | 2041 | return 255; |