diff options
Diffstat (limited to 'fs/xfs/xfs_icache.h')
-rw-r--r-- | fs/xfs/xfs_icache.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/xfs_icache.h b/fs/xfs/xfs_icache.h index 9cf017b899be..6250430d609c 100644 --- a/fs/xfs/xfs_icache.h +++ b/fs/xfs/xfs_icache.h | |||
@@ -72,14 +72,14 @@ xfs_fs_eofblocks_from_user( | |||
72 | struct xfs_eofblocks *dst) | 72 | struct xfs_eofblocks *dst) |
73 | { | 73 | { |
74 | if (src->eof_version != XFS_EOFBLOCKS_VERSION) | 74 | if (src->eof_version != XFS_EOFBLOCKS_VERSION) |
75 | return EINVAL; | 75 | return -EINVAL; |
76 | 76 | ||
77 | if (src->eof_flags & ~XFS_EOF_FLAGS_VALID) | 77 | if (src->eof_flags & ~XFS_EOF_FLAGS_VALID) |
78 | return EINVAL; | 78 | return -EINVAL; |
79 | 79 | ||
80 | if (memchr_inv(&src->pad32, 0, sizeof(src->pad32)) || | 80 | if (memchr_inv(&src->pad32, 0, sizeof(src->pad32)) || |
81 | memchr_inv(src->pad64, 0, sizeof(src->pad64))) | 81 | memchr_inv(src->pad64, 0, sizeof(src->pad64))) |
82 | return EINVAL; | 82 | return -EINVAL; |
83 | 83 | ||
84 | dst->eof_flags = src->eof_flags; | 84 | dst->eof_flags = src->eof_flags; |
85 | dst->eof_prid = src->eof_prid; | 85 | dst->eof_prid = src->eof_prid; |
@@ -89,14 +89,14 @@ xfs_fs_eofblocks_from_user( | |||
89 | if (src->eof_flags & XFS_EOF_FLAGS_UID) { | 89 | if (src->eof_flags & XFS_EOF_FLAGS_UID) { |
90 | dst->eof_uid = make_kuid(current_user_ns(), src->eof_uid); | 90 | dst->eof_uid = make_kuid(current_user_ns(), src->eof_uid); |
91 | if (!uid_valid(dst->eof_uid)) | 91 | if (!uid_valid(dst->eof_uid)) |
92 | return EINVAL; | 92 | return -EINVAL; |
93 | } | 93 | } |
94 | 94 | ||
95 | dst->eof_gid = INVALID_GID; | 95 | dst->eof_gid = INVALID_GID; |
96 | if (src->eof_flags & XFS_EOF_FLAGS_GID) { | 96 | if (src->eof_flags & XFS_EOF_FLAGS_GID) { |
97 | dst->eof_gid = make_kgid(current_user_ns(), src->eof_gid); | 97 | dst->eof_gid = make_kgid(current_user_ns(), src->eof_gid); |
98 | if (!gid_valid(dst->eof_gid)) | 98 | if (!gid_valid(dst->eof_gid)) |
99 | return EINVAL; | 99 | return -EINVAL; |
100 | } | 100 | } |
101 | return 0; | 101 | return 0; |
102 | } | 102 | } |