aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/ioctl.c')
-rw-r--r--fs/ext4/ioctl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 7b4aa4543c83..c04c7ccba9e3 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -28,6 +28,7 @@ int ext4_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
28 28
29 switch (cmd) { 29 switch (cmd) {
30 case EXT4_IOC_GETFLAGS: 30 case EXT4_IOC_GETFLAGS:
31 ext4_get_inode_flags(ei);
31 flags = ei->i_flags & EXT4_FL_USER_VISIBLE; 32 flags = ei->i_flags & EXT4_FL_USER_VISIBLE;
32 return put_user(flags, (int __user *) arg); 33 return put_user(flags, (int __user *) arg);
33 case EXT4_IOC_SETFLAGS: { 34 case EXT4_IOC_SETFLAGS: {
@@ -96,7 +97,7 @@ int ext4_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
96 ei->i_flags = flags; 97 ei->i_flags = flags;
97 98
98 ext4_set_inode_flags(inode); 99 ext4_set_inode_flags(inode);
99 inode->i_ctime = CURRENT_TIME_SEC; 100 inode->i_ctime = ext4_current_time(inode);
100 101
101 err = ext4_mark_iloc_dirty(handle, inode, &iloc); 102 err = ext4_mark_iloc_dirty(handle, inode, &iloc);
102flags_err: 103flags_err:
@@ -133,14 +134,14 @@ flags_err:
133 return PTR_ERR(handle); 134 return PTR_ERR(handle);
134 err = ext4_reserve_inode_write(handle, inode, &iloc); 135 err = ext4_reserve_inode_write(handle, inode, &iloc);
135 if (err == 0) { 136 if (err == 0) {
136 inode->i_ctime = CURRENT_TIME_SEC; 137 inode->i_ctime = ext4_current_time(inode);
137 inode->i_generation = generation; 138 inode->i_generation = generation;
138 err = ext4_mark_iloc_dirty(handle, inode, &iloc); 139 err = ext4_mark_iloc_dirty(handle, inode, &iloc);
139 } 140 }
140 ext4_journal_stop(handle); 141 ext4_journal_stop(handle);
141 return err; 142 return err;
142 } 143 }
143#ifdef CONFIG_JBD_DEBUG 144#ifdef CONFIG_JBD2_DEBUG
144 case EXT4_IOC_WAIT_FOR_READONLY: 145 case EXT4_IOC_WAIT_FOR_READONLY:
145 /* 146 /*
146 * This is racy - by the time we're woken up and running, 147 * This is racy - by the time we're woken up and running,
@@ -282,7 +283,7 @@ long ext4_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
282 case EXT4_IOC32_SETVERSION_OLD: 283 case EXT4_IOC32_SETVERSION_OLD:
283 cmd = EXT4_IOC_SETVERSION_OLD; 284 cmd = EXT4_IOC_SETVERSION_OLD;
284 break; 285 break;
285#ifdef CONFIG_JBD_DEBUG 286#ifdef CONFIG_JBD2_DEBUG
286 case EXT4_IOC32_WAIT_FOR_READONLY: 287 case EXT4_IOC32_WAIT_FOR_READONLY:
287 cmd = EXT4_IOC_WAIT_FOR_READONLY; 288 cmd = EXT4_IOC_WAIT_FOR_READONLY;
288 break; 289 break;