aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/inode.h')
-rw-r--r--fs/gfs2/inode.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/gfs2/inode.h b/fs/gfs2/inode.h
index e42ae38d6778..214975c6bb22 100644
--- a/fs/gfs2/inode.h
+++ b/fs/gfs2/inode.h
@@ -20,6 +20,11 @@ static inline int gfs2_is_jdata(struct gfs2_inode *ip)
20 return ip->i_di.di_flags & GFS2_DIF_JDATA; 20 return ip->i_di.di_flags & GFS2_DIF_JDATA;
21} 21}
22 22
23static inline int gfs2_is_dir(struct gfs2_inode *ip)
24{
25 return S_ISDIR(ip->i_di.di_mode);
26}
27
23void gfs2_inode_attr_in(struct gfs2_inode *ip); 28void gfs2_inode_attr_in(struct gfs2_inode *ip);
24void gfs2_inode_attr_out(struct gfs2_inode *ip); 29void gfs2_inode_attr_out(struct gfs2_inode *ip);
25struct inode *gfs2_ip2v_lookup(struct gfs2_inode *ip); 30struct inode *gfs2_ip2v_lookup(struct gfs2_inode *ip);
@@ -72,9 +77,9 @@ static inline int gfs2_lookup_simple(struct inode *dip, char *name,
72 err = gfs2_lookupi(get_v2ip(dip), &qstr, 1, &ip); 77 err = gfs2_lookupi(get_v2ip(dip), &qstr, 1, &ip);
73 if (err == 0) { 78 if (err == 0) {
74 *ipp = gfs2_ip2v(ip); 79 *ipp = gfs2_ip2v(ip);
80 gfs2_inode_put(ip);
75 if (*ipp == NULL) 81 if (*ipp == NULL)
76 err = -ENOMEM; 82 err = -ENOMEM;
77 gfs2_inode_put(ip);
78 } 83 }
79 return err; 84 return err;
80} 85}