diff options
author | Aristeu Rozanski <aris@redhat.com> | 2012-09-11 16:28:11 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-09-13 14:08:47 -0400 |
commit | 4895768b6aab55bbdbebcf2da090cb1a5ccf5463 (patch) | |
tree | d28dd72460784469e1f3945295197be4d8166bd3 /fs/xattr.c | |
parent | 19ec2567e0a5fe64f4404ad6df697894aec8c493 (diff) |
fs: add missing documentation to simple_xattr functions
v2: add function documentation instead of adding a separate file under
Documentation/
tj: Updated comment a bit and rolled in Randy's suggestions.
Cc: Li Zefan <lizefan@huawei.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: Lennart Poettering <lpoetter@redhat.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Aristeu Rozanski <aris@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'fs/xattr.c')
-rw-r--r-- | fs/xattr.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/fs/xattr.c b/fs/xattr.c index e17e773517ef..f053c1135d0f 100644 --- a/fs/xattr.c +++ b/fs/xattr.c | |||
@@ -892,8 +892,19 @@ out: | |||
892 | 892 | ||
893 | } | 893 | } |
894 | 894 | ||
895 | /* | 895 | /** |
896 | * xattr SET operation for in-memory/pseudo filesystems | 896 | * simple_xattr_set - xattr SET operation for in-memory/pseudo filesystems |
897 | * @xattrs: target simple_xattr list | ||
898 | * @name: name of the new extended attribute | ||
899 | * @value: value of the new xattr. If %NULL, will remove the attribute | ||
900 | * @size: size of the new xattr | ||
901 | * @flags: %XATTR_{CREATE|REPLACE} | ||
902 | * | ||
903 | * %XATTR_CREATE is set, the xattr shouldn't exist already; otherwise fails | ||
904 | * with -EEXIST. If %XATTR_REPLACE is set, the xattr should exist; | ||
905 | * otherwise, fails with -ENODATA. | ||
906 | * | ||
907 | * Returns 0 on success, -errno on failure. | ||
897 | */ | 908 | */ |
898 | int simple_xattr_set(struct simple_xattrs *xattrs, const char *name, | 909 | int simple_xattr_set(struct simple_xattrs *xattrs, const char *name, |
899 | const void *value, size_t size, int flags) | 910 | const void *value, size_t size, int flags) |
@@ -950,6 +961,9 @@ ssize_t simple_xattr_list(struct simple_xattrs *xattrs, char *buffer, | |||
950 | return used; | 961 | return used; |
951 | } | 962 | } |
952 | 963 | ||
964 | /* | ||
965 | * Adds an extended attribute to the list | ||
966 | */ | ||
953 | void simple_xattr_list_add(struct simple_xattrs *xattrs, | 967 | void simple_xattr_list_add(struct simple_xattrs *xattrs, |
954 | struct simple_xattr *new_xattr) | 968 | struct simple_xattr *new_xattr) |
955 | { | 969 | { |