diff options
| -rw-r--r-- | fs/jffs2/readinode.c | 1 | ||||
| -rw-r--r-- | fs/jffs2/xattr.c | 7 | ||||
| -rw-r--r-- | fs/jffs2/xattr.h | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c index 3833d74f2305..1ea349fff68b 100644 --- a/fs/jffs2/readinode.c +++ b/fs/jffs2/readinode.c | |||
| @@ -1421,6 +1421,7 @@ int jffs2_do_crccheck_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *i | |||
| 1421 | mutex_unlock(&f->sem); | 1421 | mutex_unlock(&f->sem); |
| 1422 | jffs2_do_clear_inode(c, f); | 1422 | jffs2_do_clear_inode(c, f); |
| 1423 | } | 1423 | } |
| 1424 | jffs2_xattr_do_crccheck_inode(c, ic); | ||
| 1424 | kfree (f); | 1425 | kfree (f); |
| 1425 | return ret; | 1426 | return ret; |
| 1426 | } | 1427 | } |
diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c index c18c0ab70ea4..3034e970eb9a 100644 --- a/fs/jffs2/xattr.c +++ b/fs/jffs2/xattr.c | |||
| @@ -437,6 +437,8 @@ static void unrefer_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datu | |||
| 437 | * is called to release xattr related objects when unmounting. | 437 | * is called to release xattr related objects when unmounting. |
| 438 | * check_xattr_ref_inode(c, ic) | 438 | * check_xattr_ref_inode(c, ic) |
| 439 | * is used to confirm inode does not have duplicate xattr name/value pair. | 439 | * is used to confirm inode does not have duplicate xattr name/value pair. |
| 440 | * jffs2_xattr_do_crccheck_inode(c, ic) | ||
| 441 | * is used to force xattr data integrity check during the initial gc scan. | ||
| 440 | * -------------------------------------------------- */ | 442 | * -------------------------------------------------- */ |
| 441 | static int verify_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *ref) | 443 | static int verify_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *ref) |
| 442 | { | 444 | { |
| @@ -684,6 +686,11 @@ static int check_xattr_ref_inode(struct jffs2_sb_info *c, struct jffs2_inode_cac | |||
| 684 | return rc; | 686 | return rc; |
| 685 | } | 687 | } |
| 686 | 688 | ||
| 689 | void jffs2_xattr_do_crccheck_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic) | ||
| 690 | { | ||
| 691 | check_xattr_ref_inode(c, ic); | ||
| 692 | } | ||
| 693 | |||
| 687 | /* -------- xattr subsystem functions --------------- | 694 | /* -------- xattr subsystem functions --------------- |
| 688 | * jffs2_init_xattr_subsystem(c) | 695 | * jffs2_init_xattr_subsystem(c) |
| 689 | * is used to initialize semaphore and list_head, and some variables. | 696 | * is used to initialize semaphore and list_head, and some variables. |
diff --git a/fs/jffs2/xattr.h b/fs/jffs2/xattr.h index 7be4beb306f3..467ff376ee26 100644 --- a/fs/jffs2/xattr.h +++ b/fs/jffs2/xattr.h | |||
| @@ -77,6 +77,7 @@ extern void jffs2_clear_xattr_subsystem(struct jffs2_sb_info *c); | |||
| 77 | extern struct jffs2_xattr_datum *jffs2_setup_xattr_datum(struct jffs2_sb_info *c, | 77 | extern struct jffs2_xattr_datum *jffs2_setup_xattr_datum(struct jffs2_sb_info *c, |
| 78 | uint32_t xid, uint32_t version); | 78 | uint32_t xid, uint32_t version); |
| 79 | 79 | ||
| 80 | extern void jffs2_xattr_do_crccheck_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic); | ||
| 80 | extern void jffs2_xattr_delete_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic); | 81 | extern void jffs2_xattr_delete_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic); |
| 81 | extern void jffs2_xattr_free_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic); | 82 | extern void jffs2_xattr_free_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic); |
| 82 | 83 | ||
| @@ -108,6 +109,7 @@ extern ssize_t jffs2_listxattr(struct dentry *, char *, size_t); | |||
| 108 | #define jffs2_build_xattr_subsystem(c) | 109 | #define jffs2_build_xattr_subsystem(c) |
| 109 | #define jffs2_clear_xattr_subsystem(c) | 110 | #define jffs2_clear_xattr_subsystem(c) |
| 110 | 111 | ||
| 112 | #define jffs2_xattr_do_crccheck_inode(c, ic) | ||
| 111 | #define jffs2_xattr_delete_inode(c, ic) | 113 | #define jffs2_xattr_delete_inode(c, ic) |
| 112 | #define jffs2_xattr_free_inode(c, ic) | 114 | #define jffs2_xattr_free_inode(c, ic) |
| 113 | #define jffs2_verify_xattr(c) (1) | 115 | #define jffs2_verify_xattr(c) (1) |
