Home
last modified time | relevance | path

Searched hist:"7 bb698f09bdd01fbb6d48c14bb1dde556dc1af00" (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/fs/
H A Dattr.cdiff 7bb698f09bdd01fbb6d48c14bb1dde556dc1af00 Wed Jul 28 07:47:33 CDT 2021 Andreas Gruenbacher <agruenba@redhat.com> fs: Move notify_change permission checks into may_setattr

Move the permission checks in notify_change into a separate function to
make them available to filesystems.

When notify_change is called, the vfs performs those checks before
calling into iop->setattr. However, a filesystem like gfs2 can only
lock and revalidate the inode inside ->setattr, and it must then repeat
those checks to err on the safe side.

It would be nice to get rid of the double checking, but moving the
permission check into iop->setattr altogether isn't really an option.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
/openbmc/linux/include/linux/
H A Dfs.hdiff 7bb698f09bdd01fbb6d48c14bb1dde556dc1af00 Wed Jul 28 07:47:33 CDT 2021 Andreas Gruenbacher <agruenba@redhat.com> fs: Move notify_change permission checks into may_setattr

Move the permission checks in notify_change into a separate function to
make them available to filesystems.

When notify_change is called, the vfs performs those checks before
calling into iop->setattr. However, a filesystem like gfs2 can only
lock and revalidate the inode inside ->setattr, and it must then repeat
those checks to err on the safe side.

It would be nice to get rid of the double checking, but moving the
permission check into iop->setattr altogether isn't really an option.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>