aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/key.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-08-27 09:34:19 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-09-10 02:58:11 -0400
commite3c3efc243462d67ba9fa7f67620dcbc4597bf0a (patch)
treeae29cf8fade7c9bfac77f7ceff0381e775d80c0d /fs/ubifs/key.h
parent8c6866b071cb242584df287dbd342e5815e8407f (diff)
UBIFS: add inode size debugging check
Add one more check to UBIFS - a check that makes sure that there are no data nodes beyond inode size. And few commantaries fixes along the line. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Reviewed-by: Adrian Hunter <Adrian.Hunter@nokia.com>
Diffstat (limited to 'fs/ubifs/key.h')
-rw-r--r--fs/ubifs/key.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/ubifs/key.h b/fs/ubifs/key.h
index 919af84b9e17..0f530c684f0b 100644
--- a/fs/ubifs/key.h
+++ b/fs/ubifs/key.h
@@ -278,6 +278,18 @@ static inline void data_key_init(const struct ubifs_info *c,
278} 278}
279 279
280/** 280/**
281 * highest_data_key - get the highest possible data key for an inode.
282 * @c: UBIFS file-system description object
283 * @key: key to initialize
284 * @inum: inode number
285 */
286static inline void highest_data_key(const struct ubifs_info *c,
287 union ubifs_key *key, ino_t inum)
288{
289 data_key_init(c, key, inum, UBIFS_S_KEY_BLOCK_MASK);
290}
291
292/**
281 * trun_key_init - initialize truncation node key. 293 * trun_key_init - initialize truncation node key.
282 * @c: UBIFS file-system description object 294 * @c: UBIFS file-system description object
283 * @key: key to initialize 295 * @key: key to initialize
@@ -518,4 +530,5 @@ static inline unsigned long long key_max_inode_size(const struct ubifs_info *c)
518 return 0; 530 return 0;
519 } 531 }
520} 532}
533
521#endif /* !__UBIFS_KEY_H__ */ 534#endif /* !__UBIFS_KEY_H__ */