ext3_jbd.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Interface between ext3 and JBD
  3. */
  4. #include "ext3.h"
  5. int __ext3_journal_get_undo_access(const char *where, handle_t *handle,
  6. struct buffer_head *bh)
  7. {
  8. int err = journal_get_undo_access(handle, bh);
  9. if (err)
  10. ext3_journal_abort_handle(where, __func__, bh, handle,err);
  11. return err;
  12. }
  13. int __ext3_journal_get_write_access(const char *where, handle_t *handle,
  14. struct buffer_head *bh)
  15. {
  16. int err = journal_get_write_access(handle, bh);
  17. if (err)
  18. ext3_journal_abort_handle(where, __func__, bh, handle,err);
  19. return err;
  20. }
  21. int __ext3_journal_forget(const char *where, handle_t *handle,
  22. struct buffer_head *bh)
  23. {
  24. int err = journal_forget(handle, bh);
  25. if (err)
  26. ext3_journal_abort_handle(where, __func__, bh, handle,err);
  27. return err;
  28. }
  29. int __ext3_journal_revoke(const char *where, handle_t *handle,
  30. unsigned long blocknr, struct buffer_head *bh)
  31. {
  32. int err = journal_revoke(handle, blocknr, bh);
  33. if (err)
  34. ext3_journal_abort_handle(where, __func__, bh, handle,err);
  35. return err;
  36. }
  37. int __ext3_journal_get_create_access(const char *where,
  38. handle_t *handle, struct buffer_head *bh)
  39. {
  40. int err = journal_get_create_access(handle, bh);
  41. if (err)
  42. ext3_journal_abort_handle(where, __func__, bh, handle,err);
  43. return err;
  44. }
  45. int __ext3_journal_dirty_metadata(const char *where,
  46. handle_t *handle, struct buffer_head *bh)
  47. {
  48. int err = journal_dirty_metadata(handle, bh);
  49. if (err)
  50. ext3_journal_abort_handle(where, __func__, bh, handle,err);
  51. return err;
  52. }