diff options
-rw-r--r-- | fs/ceph/export.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ceph/export.c b/fs/ceph/export.c index 9349bb37a2fe..ca3ab3f9ca70 100644 --- a/fs/ceph/export.c +++ b/fs/ceph/export.c | |||
@@ -56,13 +56,15 @@ static int ceph_encode_fh(struct inode *inode, u32 *rawfh, int *max_len, | |||
56 | struct ceph_nfs_confh *cfh = (void *)rawfh; | 56 | struct ceph_nfs_confh *cfh = (void *)rawfh; |
57 | int connected_handle_length = sizeof(*cfh)/4; | 57 | int connected_handle_length = sizeof(*cfh)/4; |
58 | int handle_length = sizeof(*fh)/4; | 58 | int handle_length = sizeof(*fh)/4; |
59 | struct dentry *dentry = d_find_alias(inode); | 59 | struct dentry *dentry; |
60 | struct dentry *parent; | 60 | struct dentry *parent; |
61 | 61 | ||
62 | /* don't re-export snaps */ | 62 | /* don't re-export snaps */ |
63 | if (ceph_snap(inode) != CEPH_NOSNAP) | 63 | if (ceph_snap(inode) != CEPH_NOSNAP) |
64 | return -EINVAL; | 64 | return -EINVAL; |
65 | 65 | ||
66 | dentry = d_find_alias(inode); | ||
67 | |||
66 | /* if we found an alias, generate a connectable fh */ | 68 | /* if we found an alias, generate a connectable fh */ |
67 | if (*max_len >= connected_handle_length && dentry) { | 69 | if (*max_len >= connected_handle_length && dentry) { |
68 | dout("encode_fh %p connectable\n", dentry); | 70 | dout("encode_fh %p connectable\n", dentry); |