提交 69a23de2 编写于 作者: M Martin Brandenburg 提交者: Mike Marshall

orangefs: clean up fill_default_sys_attrs

Size and type are read-only and not in the mask. The times were left
unset despite being in the mask.

We zero-fill the times since the server will fill them in and we will
get the correct time when we fill the inode with getattr.
Signed-off-by: NMartin Brandenburg <martin@omnibond.com>
Signed-off-by: NMike Marshall <hubcap@omnibond.com>
上级 6ceaf781
...@@ -645,9 +645,10 @@ do { \ ...@@ -645,9 +645,10 @@ do { \
do { \ do { \
sys_attr.owner = from_kuid(current_user_ns(), current_fsuid()); \ sys_attr.owner = from_kuid(current_user_ns(), current_fsuid()); \
sys_attr.group = from_kgid(current_user_ns(), current_fsgid()); \ sys_attr.group = from_kgid(current_user_ns(), current_fsgid()); \
sys_attr.size = 0; \
sys_attr.perms = ORANGEFS_util_translate_mode(mode); \ sys_attr.perms = ORANGEFS_util_translate_mode(mode); \
sys_attr.objtype = type; \ sys_attr.mtime = 0; \
sys_attr.atime = 0; \
sys_attr.ctime = 0; \
sys_attr.mask = ORANGEFS_ATTR_SYS_ALL_SETABLE; \ sys_attr.mask = ORANGEFS_ATTR_SYS_ALL_SETABLE; \
} while (0) } while (0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册