Whamcloud - gitweb
LU-12137 osd-ldiskfs: use ERR_CAST in osd_oi_index_open()
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_oi.c
index bb9cd1b..483f6a3 100644 (file)
@@ -164,7 +164,7 @@ static struct inode *osd_oi_index_open(struct osd_thread_info *info,
        dentry = osd_lookup_one_len_unlocked(name, osd_sb(osd)->s_root,
                                             strlen(name));
         if (IS_ERR(dentry))
-                return (void *) dentry;
+               return ERR_CAST(dentry);
 
         if (dentry->d_inode) {
                 LASSERT(!is_bad_inode(dentry->d_inode));
@@ -187,7 +187,7 @@ static struct inode *osd_oi_index_open(struct osd_thread_info *info,
        dentry = osd_lookup_one_len_unlocked(name, osd_sb(osd)->s_root,
                                             strlen(name));
         if (IS_ERR(dentry))
-                return (void *) dentry;
+               return ERR_CAST(dentry);
 
         if (dentry->d_inode) {
                 LASSERT(!is_bad_inode(dentry->d_inode));