]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nilfs2/the_nilfs.h
nilfs2: simplify handling of active state of segments
[linux-2.6-omap-h63xx.git] / fs / nilfs2 / the_nilfs.h
index af566e78f7af132cc09061496c06cca49cc8ba76..d750e48257c94ba9c1be0a64284f138cd67ec98d 100644 (file)
@@ -280,4 +280,9 @@ static inline __u64 nilfs_last_cno(struct the_nilfs *nilfs)
        return cno;
 }
 
+static inline int nilfs_segment_is_active(struct the_nilfs *nilfs, __u64 n)
+{
+       return n == nilfs->ns_segnum || n == nilfs->ns_nextnum;
+}
+
 #endif /* _THE_NILFS_H */