Skip to content

Commit

Permalink
ubifs: setflags: Don't show error message when vfs_ioc_setflags_prepa…
Browse files Browse the repository at this point in the history
…re() fails

Following process will trigger ubifs_err:
  1. useradd -m freg                                        (Under root)
  2. cd /home/freg && mkdir mp                              (Under freg)
  3. mount -t ubifs /dev/ubi0_0 /home/freg/mp               (Under root)
  4. cd /home/freg && echo 123 > mp/a			    (Under root)
  5. cd mp && chown freg a && chgrp freg a && chmod 777 a   (Under root)
  6. chattr +i a                                            (Under freg)

UBIFS error (ubi0:0 pid 1723): ubifs_ioctl [ubifs]: can't modify inode
65 attributes
chattr: Operation not permitted while setting flags on a

This is not an UBIFS problem, it was caused by task priviliage checking
on file operations. Remove error message printing from kernel just like
other filesystems (eg. ext4), since we already have enough information
from userspace tools.

Signed-off-by: Zhihao Cheng <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
  • Loading branch information
Zhihao Cheng authored and richardweinberger committed Sep 17, 2020
1 parent dd7db14 commit 121b8fc
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/ubifs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ static int setflags(struct inode *inode, int flags)
return err;

out_unlock:
ubifs_err(c, "can't modify inode %lu attributes", inode->i_ino);
mutex_unlock(&ui->ui_mutex);
ubifs_release_budget(c, &req);
return err;
Expand Down

0 comments on commit 121b8fc

Please sign in to comment.