]> err.no Git - linux-2.6/blobdiff - fs/gfs2/ops_export.c
rtc: rtc_time_to_tm: use unsigned arithmetic
[linux-2.6] / fs / gfs2 / ops_export.c
index c291005ec59223e143ca38199861a94a450cd2f0..990d9f4bc463588df8f24e94f9439f4750e8f951 100644 (file)
@@ -143,7 +143,7 @@ static struct dentry *gfs2_get_parent(struct dentry *child)
         * have to return that as a(n invalid) pointer to dentry.
         */
        if (IS_ERR(inode))
-               return ERR_PTR(PTR_ERR(inode));
+               return ERR_CAST(inode);
 
        dentry = d_alloc_anon(inode);
        if (!dentry) {
@@ -204,8 +204,6 @@ static struct dentry *gfs2_get_dentry(struct super_block *sb,
        inode = gfs2_inode_lookup(sb, DT_UNKNOWN,
                                        inum->no_addr,
                                        0, 0);
-       if (!inode)
-               goto fail;
        if (IS_ERR(inode)) {
                error = PTR_ERR(inode);
                goto fail;
@@ -294,7 +292,7 @@ static struct dentry *gfs2_fh_to_parent(struct super_block *sb, struct fid *fid,
        }
 }
 
-struct export_operations gfs2_export_ops = {
+const struct export_operations gfs2_export_ops = {
        .encode_fh = gfs2_encode_fh,
        .fh_to_dentry = gfs2_fh_to_dentry,
        .fh_to_parent = gfs2_fh_to_parent,