mirror of
https://gitee.com/bianbu-linux/linux-6.6-fh
synced 2025-04-24 20:27:07 -04:00
struct file-related stuff
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQqUNBr3gm4hGXdBJlZ7Krx/gZQ6wUCYzxjIQAKCRBZ7Krx/gZQ 6/FPAQCNCZygQzd+54//vo4kTwv5T2Bv3hS8J51rASPJT87/BQD/TfCLS5urt/Gt 81A1dFOfnTXseofuBKyGSXwQm0dWpgA= =PLre -----END PGP SIGNATURE----- Merge tag 'pull-file' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs file updates from Al Viro: "struct file-related stuff" * tag 'pull-file' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: dma_buf_getfile(): don't bother with ->f_flags reassignments Change calling conventions for filldir_t locks: fix TOCTOU race when granting write lease
This commit is contained in:
commit
7a3353c5c4
23 changed files with 169 additions and 169 deletions
|
@ -705,7 +705,7 @@ static int fat_readdir(struct file *file, struct dir_context *ctx)
|
|||
}
|
||||
|
||||
#define FAT_IOCTL_FILLDIR_FUNC(func, dirent_type) \
|
||||
static int func(struct dir_context *ctx, const char *name, int name_len, \
|
||||
static bool func(struct dir_context *ctx, const char *name, int name_len, \
|
||||
loff_t offset, u64 ino, unsigned int d_type) \
|
||||
{ \
|
||||
struct fat_ioctl_filldir_callback *buf = \
|
||||
|
@ -714,7 +714,7 @@ static int func(struct dir_context *ctx, const char *name, int name_len, \
|
|||
struct dirent_type __user *d2 = d1 + 1; \
|
||||
\
|
||||
if (buf->result) \
|
||||
return -EINVAL; \
|
||||
return false; \
|
||||
buf->result++; \
|
||||
\
|
||||
if (name != NULL) { \
|
||||
|
@ -750,10 +750,10 @@ static int func(struct dir_context *ctx, const char *name, int name_len, \
|
|||
put_user(short_len, &d1->d_reclen)) \
|
||||
goto efault; \
|
||||
} \
|
||||
return 0; \
|
||||
return true; \
|
||||
efault: \
|
||||
buf->result = -EFAULT; \
|
||||
return -EFAULT; \
|
||||
return false; \
|
||||
}
|
||||
|
||||
FAT_IOCTL_FILLDIR_FUNC(fat_ioctl_filldir, __fat_dirent)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue