]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: don't trash state flags in EXT4_IOC_SETFLAGS
authorTheodore Ts'o <tytso@mit.edu>
Fri, 1 Jun 2012 03:46:01 +0000 (23:46 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 1 Jun 2012 03:46:01 +0000 (23:46 -0400)
commit7826c8891c130dc97e37a104f438b9dc49c1dc98
treebb9cec1905d268cda5d46a95b993e0a173c226c4
parentb8c41171baeb1c3ea462b92af03d5d379c037c5d
ext4: don't trash state flags in EXT4_IOC_SETFLAGS

In commit f8dbd81d we removed i_state_flags with 64-bit longs, But
when handling the EXT4_IOC_SETFLAGS ioctl, we replace i_flags
directly, which trashes the state flags which are stored in the high
32-bits of i_flags on 64-bit platforms.  So use the the
ext4_{set,clear}_inode_flags() functions which use atomic bit
manipulation functions instead.

Reported-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
fs/ext4/ioctl.c