]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: fix inode refcount leak
authorYehuda Sadeh <yehuda@hq.newdream.net>
Mon, 16 Mar 2009 22:47:59 +0000 (15:47 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Mon, 16 Mar 2009 22:47:59 +0000 (15:47 -0700)
src/kernel/inode.c

index e34faeae479c74252aabf3727b6290100afa94bb..bedf122a0d21902117a48d1f128a11fbe03ae6b2 100644 (file)
@@ -813,6 +813,9 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req,
 
        if (likely(sb->s_root)) {
                dn = d_find_alias(in);
+               if (IS_ERR(dn))
+                       return PTR_ERR(dn);
+               iput(in);
        } else {
                /* first reply (i.e. we just mounted) */
                dn = d_alloc_root(in);