mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
vfs: protect i_nlink
Prevent direct modification of i_nlink by making it const and adding a non-const __i_nlink alias. Signed-off-by: Miklos Szeredi <[email protected]> Tested-by: Toshiyuki Okajima <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
This commit is contained in:
parent
bfe8684869
commit
a78ef704a8
2 changed files with 16 additions and 6 deletions
|
|
@ -142,7 +142,7 @@ int inode_init_always(struct super_block *sb, struct inode *inode)
|
|||
atomic_set(&inode->i_count, 1);
|
||||
inode->i_op = &empty_iops;
|
||||
inode->i_fop = &empty_fops;
|
||||
inode->i_nlink = 1;
|
||||
inode->__i_nlink = 1;
|
||||
inode->i_opflags = 0;
|
||||
inode->i_uid = 0;
|
||||
inode->i_gid = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue