summaryrefslogtreecommitdiffstats
path: root/fs/jffs2/gc.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2008-05-01 19:47:17 +0200
committerDavid Woodhouse <dwmw2@infradead.org>2008-05-01 19:47:17 +0200
commit27c72b040c0be8f3704ed0b6b84c12cbba24a7e8 (patch)
tree0b84847120e817465d517d21fa4653d958222567 /fs/jffs2/gc.c
parent[JFFS2] Invert last argument of jffs2_gc_fetch_inode(), make it boolean. (diff)
downloadlinux-27c72b040c0be8f3704ed0b6b84c12cbba24a7e8.tar.xz
linux-27c72b040c0be8f3704ed0b6b84c12cbba24a7e8.zip
[JFFS2] Track parent inode for directories (for NFS export)
To support NFS export, we need to know the parent inode of directories. Rather than growing the jffs2_inode_cache structure, share space with the nlink field -- which was always set to 1 for directories anyway. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/gc.c')
-rw-r--r--fs/jffs2/gc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/jffs2/gc.c b/fs/jffs2/gc.c
index d4db0efeceaf..090c556ffed2 100644
--- a/fs/jffs2/gc.c
+++ b/fs/jffs2/gc.c
@@ -161,8 +161,8 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c)
continue;
}
- if (!ic->nlink) {
- D1(printk(KERN_DEBUG "Skipping check of ino #%d with nlink zero\n",
+ if (!ic->pino_nlink) {
+ D1(printk(KERN_DEBUG "Skipping check of ino #%d with nlink/pino zero\n",
ic->ino));
spin_unlock(&c->inocache_lock);
jffs2_xattr_delete_inode(c, ic);
@@ -398,7 +398,7 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c)
it's vaguely possible. */
inum = ic->ino;
- nlink = ic->nlink;
+ nlink = ic->pino_nlink;
spin_unlock(&c->inocache_lock);
f = jffs2_gc_fetch_inode(c, inum, !nlink);