ext2: protect inode changes in the SETVERSION and SETFLAGS ioctls
authorDjalal Harouni <tixxdz@opendz.org>
Mon, 9 Jan 2012 14:58:37 +0000 (15:58 +0100)
committerJan Kara <jack@suse.cz>
Wed, 11 Jan 2012 12:39:02 +0000 (13:39 +0100)
commit34b07840565004cfa444e165e88bf77a5cbcdb25
treed1a642967e1bebc62779d367b73cd31db52634d7
parent353b67d8ced4dc53281c88150ad295e24bc4b4c5
ext2: protect inode changes in the SETVERSION and SETFLAGS ioctls

Unlock mutex after i_flags and i_ctime updates in the EXT2_IOC_SETFLAGS
ioctl.

Use i_mutex in the EXT2_IOC_SETVERSION ioctl to protect i_ctime and
i_generation updates and make the ioctl consistent since i_mutex is
also used in other places to protect timestamps and inode changes.

Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext2/ioctl.c