diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-20 12:19:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-20 12:19:03 -0400 |
commit | 396b122f6af3d329df3b4d688f6e66de3e2a399a (patch) | |
tree | 0b4185d529c1ba4c8eca1de23f14beecbe460323 /fs/ubifs/misc.h | |
parent | ed402af3c23a4804b3f8899263e8d0f97c62ab49 (diff) | |
parent | 54779aabb0183bbe049d2b52e96cd148366dfb0b (diff) |
Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6
* 'linux-next' of git://git.infradead.org/ubifs-2.6: (25 commits)
UBIFS: fix ubifs_compress commentary
UBIFS: amend printk
UBIFS: do not read unnecessary bytes when unpacking bits
UBIFS: check buffer length when scanning for LPT nodes
UBIFS: correct condition to eliminate unecessary assignment
UBIFS: add more debugging messages for LPT
UBIFS: fix bulk-read handling uptodate pages
UBIFS: improve garbage collection
UBIFS: allow for sync_fs when read-only
UBIFS: commit on sync_fs
UBIFS: correct comment for commit_on_unmount
UBIFS: update dbg_dump_inode
UBIFS: fix commentary
UBIFS: fix races in bit-fields
UBIFS: ensure data read beyond i_size is zeroed out correctly
UBIFS: correct key comparison
UBIFS: use bit-fields when possible
UBIFS: check data CRC when in error state
UBIFS: improve znode splitting rules
UBIFS: add no_chk_data_crc mount option
...
Diffstat (limited to 'fs/ubifs/misc.h')
-rw-r--r-- | fs/ubifs/misc.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/fs/ubifs/misc.h b/fs/ubifs/misc.h index 4c12a9215d7f..4fa81d867e41 100644 --- a/fs/ubifs/misc.h +++ b/fs/ubifs/misc.h | |||
@@ -310,4 +310,31 @@ static inline int ubifs_tnc_lookup(struct ubifs_info *c, | |||
310 | return ubifs_tnc_locate(c, key, node, NULL, NULL); | 310 | return ubifs_tnc_locate(c, key, node, NULL, NULL); |
311 | } | 311 | } |
312 | 312 | ||
313 | /** | ||
314 | * ubifs_get_lprops - get reference to LEB properties. | ||
315 | * @c: the UBIFS file-system description object | ||
316 | * | ||
317 | * This function locks lprops. Lprops have to be unlocked by | ||
318 | * 'ubifs_release_lprops()'. | ||
319 | */ | ||
320 | static inline void ubifs_get_lprops(struct ubifs_info *c) | ||
321 | { | ||
322 | mutex_lock(&c->lp_mutex); | ||
323 | } | ||
324 | |||
325 | /** | ||
326 | * ubifs_release_lprops - release lprops lock. | ||
327 | * @c: the UBIFS file-system description object | ||
328 | * | ||
329 | * This function has to be called after each 'ubifs_get_lprops()' call to | ||
330 | * unlock lprops. | ||
331 | */ | ||
332 | static inline void ubifs_release_lprops(struct ubifs_info *c) | ||
333 | { | ||
334 | ubifs_assert(mutex_is_locked(&c->lp_mutex)); | ||
335 | ubifs_assert(c->lst.empty_lebs >= 0 && | ||
336 | c->lst.empty_lebs <= c->main_lebs); | ||
337 | mutex_unlock(&c->lp_mutex); | ||
338 | } | ||
339 | |||
313 | #endif /* __UBIFS_MISC_H__ */ | 340 | #endif /* __UBIFS_MISC_H__ */ |