97{
100
102
107
109 ULONG UserEaListLength;
111
115
118
120
123
124 ULONG UserBufferLength = 0;
125 ULONG RemainingUserBufferLength = 0;
126
128
130
141
142 Irp->IoStatus.Information = 0;
143
144
145
146
148 if (!UserBuffer) {
151 }
153 RemainingUserBufferLength = UserBufferLength;
160
163
164
165
166
172 }
173 MainResourceAcquired =
TRUE;
174
177 DbgPrint(
"ext4_fs_get_xattr_ref() failed!\n");
179 }
180
182
183 XattrRefAcquired =
TRUE;
184
185 if (RemainingUserBufferLength)
187
188 if (UserEaList !=
NULL) {
193 + UserEaListLength);
198
203
206
207
208
209
210
216 0,
219 continue;
220
221
222
223
224
225
226
227
229 if (!is_last)
231
232 if (EaEntrySize > RemainingUserBufferLength) {
233
236 }
244
245
246
247
248
249
250
251
260 ))));
262
263
264 if (LastFullEa)
267
268 LastFullEa = FullEa;
270 ((
PCHAR)FullEa + EaEntrySize);
271 RemainingUserBufferLength -= EaEntrySize;
273 }
274 } else if (IndexSpecified) {
276
277
278
281
284
291
294
296
298
299
302
306 else
308 }
309
310 } else {
312
313
314
315
318
321
330
333
335
338
340
344 else
346 }
347
348 }
349 }
351
352 if (XattrRefAcquired) {
354 xattr_ref.dirty =
FALSE;
356 }
357 else
359 }
360
361 if (MainResourceAcquired) {
363 }
364
367 IrpContext,
373 }
374
378 }
379 else {
381 }
382 }
384
386}
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
#define IRP_CONTEXT_FLAG_WAIT
#define NT_SUCCESS(StatCode)
static int Ext2IterateAllEa(struct ext4_xattr_ref *xattr_ref, struct ext4_xattr_item *item, BOOL is_last)
_In_ PIO_STACK_LOCATION IrpSp
#define ExAcquireResourceExclusiveLite(res, wait)
NTSTATUS Ext2WinntError(int rc)
NTSTATUS Ext2QueueRequest(IN PEXT2_IRP_CONTEXT IrpContext)
PVOID Ext2GetUserBuffer(IN PIRP Irp)
VOID Ext2NotifyReportChange(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Filter, IN ULONG Action)
struct _EXT2_VCB * PEXT2_VCB
#define BooleanFlagOn(F, SF)
NTSTATUS Ext2CompleteIrpContext(IN PEXT2_IRP_CONTEXT IrpContext, IN NTSTATUS Status)
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG _In_ BOOLEAN _In_ ULONG _In_opt_ PULONG _In_ BOOLEAN RestartScan
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG _In_ BOOLEAN ReturnSingleEntry
struct _FILE_GET_EA_INFORMATION * PFILE_GET_EA_INFORMATION
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
int ext4_fs_get_xattr(struct ext4_xattr_ref *ref, __u8 name_index, const char *name, size_t name_len, void *buf, size_t buf_size, size_t *data_size)
void ext4_fs_xattr_iterate(struct ext4_xattr_ref *ref, int(*iter)(struct ext4_xattr_ref *ref, struct ext4_xattr_item *item, BOOL is_last))
#define EXT4_XATTR_INDEX_USER
int ext4_fs_put_xattr_ref(struct ext4_xattr_ref *ref)
int ext4_fs_get_xattr_ref(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB fs, PEXT2_MCB inode_ref, struct ext4_xattr_ref *ref)
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
#define STATUS_OBJECTID_NOT_FOUND
#define _SEH2_AbnormalTermination()
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
NTFSIDENTIFIER Identifier
struct _IO_STACK_LOCATION::@3978::@3989 QueryEa
union _IO_STACK_LOCATION::@1579 Parameters
PDEVICE_OBJECT DeviceObject
PEXT2_IRP_CONTEXT IrpContext
#define RtlZeroMemory(Destination, Length)
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
_In_ PDEVICE_OBJECT DeviceObject
#define SL_INDEX_SPECIFIED
#define FILE_ACTION_MODIFIED
#define SL_RETURN_SINGLE_ENTRY
#define FILE_NOTIFY_CHANGE_EA