summaryrefslogtreecommitdiff
path: root/fs/cifs
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2013-07-01 16:12:41 +0400
committerTheodore Ts'o <tytso@mit.edu>2013-07-01 16:12:41 +0400
commit41a5b913197c3a25fddef1735dc9b3d1fdc57428 (patch)
tree2377e2cf3164271457785f1356ff77f8c4b79b2b /fs/cifs
parent21ddd568c133024196d394c43923f55cad1e7bd0 (diff)
downloadlinux-41a5b913197c3a25fddef1735dc9b3d1fdc57428.tar.xz
jbd2: invalidate handle if jbd2_journal_restart() fails
If jbd2_journal_restart() fails the handle will have been disconnected from the current transaction. In this situation, the handle must not be used for for any jbd2 function other than jbd2_journal_stop(). Enforce this with by treating a handle which has a NULL transaction pointer as an aborted handle, and issue a kernel warning if jbd2_journal_extent(), jbd2_journal_get_write_access(), jbd2_journal_dirty_metadata(), etc. is called with an invalid handle. This commit also fixes a bug where jbd2_journal_stop() would trip over a kernel jbd2 assertion check when trying to free an invalid handle. Also move the responsibility of setting current->journal_info to start_this_handle(), simplifying the three users of this function. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reported-by: Younger Liu <younger.liu@huawei.com> Cc: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/cifs')
0 files changed, 0 insertions, 0 deletions