Commit a710c387 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] befs: inode->i_flags thinko fix

Jorn Engel <joern@wohnheim.fh-wedel.de>

inode->i_flags should never contain fs-specific flags.  In fact, it doesn't;
the checks against it cause "chattr +T" to be useless for ext[23].  Same bug
was in befs as well.
parent c6204bb4
...@@ -376,7 +376,7 @@ befs_read_inode(struct inode *inode) ...@@ -376,7 +376,7 @@ befs_read_inode(struct inode *inode)
befs_ino->i_attribute = fsrun_to_cpu(sb, raw_inode->attributes); befs_ino->i_attribute = fsrun_to_cpu(sb, raw_inode->attributes);
befs_ino->i_flags = fs32_to_cpu(sb, raw_inode->flags); befs_ino->i_flags = fs32_to_cpu(sb, raw_inode->flags);
if (S_ISLNK(inode->i_mode) && !(inode->i_flags & BEFS_LONG_SYMLINK)) { if (S_ISLNK(inode->i_mode) && !(befs_ino->i_flags & BEFS_LONG_SYMLINK)){
inode->i_size = 0; inode->i_size = 0;
inode->i_blocks = befs_sb->block_size / VFS_BLOCK_SIZE; inode->i_blocks = befs_sb->block_size / VFS_BLOCK_SIZE;
strncpy(befs_ino->i_data.symlink, raw_inode->data.symlink, strncpy(befs_ino->i_data.symlink, raw_inode->data.symlink,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment