]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: Deduplicate code shared by xattr system calls operating on paths
authorEric Biggers <ebiggers3@gmail.com>
Sun, 12 Oct 2014 16:59:58 +0000 (11:59 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 12 Oct 2014 21:09:10 +0000 (17:09 -0400)
commit4bbcbfc22a2c15234cd68afc4d21cbb96cd38a84
tree9f75709e432ec0beed0923e935b3d63d45b4b3e7
parent98eabbca5b34981134c812b096dafa52b187ab8c
vfs: Deduplicate code shared by xattr system calls operating on paths

The following pairs of system calls dealing with extended attributes only
differ in their behavior on whether the symbolic link is followed (when
the named file is a symbolic link):

- setxattr() and lsetxattr()
- getxattr() and lgetxattr()
- listxattr() and llistxattr()
- removexattr() and lremovexattr()

Despite this, the implementations all had duplicated code, so this commit
redirects each of the above pairs of system calls to a corresponding
function to which different lookup flags (LOOKUP_FOLLOW or 0) are passed.

For me this reduced the stripped size of xattr.o from 8824 to 8248 bytes.

Signed-off-by: Eric Biggers <ebiggers3@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/xattr.c