diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-04 20:54:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-04 20:54:09 -0400 |
commit | ec4883b015c3212f6f6d04fb2ff45f528492f598 (patch) | |
tree | 0e393eb198a35a90adafcd8129564d0173aafad4 /fs/jffs2/xattr.c | |
parent | 464cf177df7727efcc5506322fc5d0c8b896f545 (diff) | |
parent | 0477d24e2a87a9077b62298b01b031929f5cf2a2 (diff) |
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6:
[JFFS2] Fix obsoletion of metadata nodes in jffs2_add_tn_to_tree()
[MTD] Fix error checking after get_mtd_device() in get_sb_mtd functions
[JFFS2] Fix buffer length calculations in jffs2_get_inode_nodes()
[JFFS2] Fix potential memory leak of dead xattrs on unmount.
[JFFS2] Fix BUG() caused by failing to discard xattrs on deleted files.
[MTD] generalise the handling of MTD-specific superblocks
[MTD] [MAPS] don't force uclinux mtd map to be root dev
Diffstat (limited to 'fs/jffs2/xattr.c')
-rw-r--r-- | fs/jffs2/xattr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c index 78fc08893a6c..e48665984cb3 100644 --- a/fs/jffs2/xattr.c +++ b/fs/jffs2/xattr.c | |||
@@ -754,6 +754,10 @@ void jffs2_clear_xattr_subsystem(struct jffs2_sb_info *c) | |||
754 | list_del(&xd->xindex); | 754 | list_del(&xd->xindex); |
755 | jffs2_free_xattr_datum(xd); | 755 | jffs2_free_xattr_datum(xd); |
756 | } | 756 | } |
757 | list_for_each_entry_safe(xd, _xd, &c->xattr_unchecked, xindex) { | ||
758 | list_del(&xd->xindex); | ||
759 | jffs2_free_xattr_datum(xd); | ||
760 | } | ||
757 | } | 761 | } |
758 | 762 | ||
759 | #define XREF_TMPHASH_SIZE (128) | 763 | #define XREF_TMPHASH_SIZE (128) |
@@ -825,7 +829,7 @@ void jffs2_build_xattr_subsystem(struct jffs2_sb_info *c) | |||
825 | ref->xd and ref->ic are not valid yet. */ | 829 | ref->xd and ref->ic are not valid yet. */ |
826 | xd = jffs2_find_xattr_datum(c, ref->xid); | 830 | xd = jffs2_find_xattr_datum(c, ref->xid); |
827 | ic = jffs2_get_ino_cache(c, ref->ino); | 831 | ic = jffs2_get_ino_cache(c, ref->ino); |
828 | if (!xd || !ic) { | 832 | if (!xd || !ic || !ic->nlink) { |
829 | dbg_xattr("xref(ino=%u, xid=%u, xseqno=%u) is orphan.\n", | 833 | dbg_xattr("xref(ino=%u, xid=%u, xseqno=%u) is orphan.\n", |
830 | ref->ino, ref->xid, ref->xseqno); | 834 | ref->ino, ref->xid, ref->xseqno); |
831 | ref->xseqno |= XREF_DELETE_MARKER; | 835 | ref->xseqno |= XREF_DELETE_MARKER; |