]> git.baikalelectronics.ru Git - kernel.git/commit
fat: relax the permission check of fat_setattr()
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Thu, 12 Jun 2008 22:21:28 +0000 (15:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 13 Jun 2008 01:05:39 +0000 (18:05 -0700)
commit112f8be6ccd136d5dd7beddf6321804bf56ba61c
treefd5c4e3b350f82e516c63349e17e43805c0899fb
parentc972d5a7d35f1f7c8cdd346f638b797ae2c6efa6
fat: relax the permission check of fat_setattr()

New chmod() allows only acceptable permission, and if not acceptable, it
returns -EPERM.  Old one allows even if it can't store permission to on
disk inode.  But it seems too strict for users.

E.g.  https://bugzilla.redhat.com/show_bug.cgi?id=449080: With new one,
rsync couldn't create the temporary file.

So, this patch allows like old one, but now it doesn't change the
permission if it can't store, and it returns 0.

Also, this patch fixes missing check.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/fat/file.c