projects
/
wrapfs-4.13.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74934ed
)
Wrapfs: copy lower inode attributes in ->ioctl
author
Erez Zadok
<ezk@cs.sunysb.edu>
Wed, 5 Jun 2013 05:36:58 +0000
(
01:36
-0400)
committer
Rohit Kumar
<rokkumar@cs.stonybrook.edu>
Fri, 12 Oct 2018 16:28:19 +0000
(12:28 -0400)
Some ioctls (e.g., EXT2_IOC_SETFLAGS) can change inode attributes, so copy
them from lower inode.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/wrapfs/file.c
patch
|
blob
|
history
diff --git
a/fs/wrapfs/file.c
b/fs/wrapfs/file.c
index 1611b222df2e8d62b1ee8bcde93ed2e0fc7c8b3c..982581635442d4c3cd78aa8b5e67a26af8dfcbcb 100644
(file)
--- a/
fs/wrapfs/file.c
+++ b/
fs/wrapfs/file.c
@@
-77,6
+77,10
@@
static long wrapfs_unlocked_ioctl(struct file *file, unsigned int cmd,
if (lower_file->f_op->unlocked_ioctl)
err = lower_file->f_op->unlocked_ioctl(lower_file, cmd, arg);
+ /* some ioctls can change inode attributes (EXT2_IOC_SETFLAGS) */
+ if (!err)
+ fsstack_copy_attr_all(file->f_path.dentry->d_inode,
+ lower_file->f_path.dentry->d_inode);
out:
return err;
}