mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
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:
@@ -2038,9 +2038,10 @@ umode_t mode_strip_sgid(struct user_namespace *mnt_userns,
|
||||
* the kernel specify what kind of dirent layout it wants to have.
|
||||
* This allows the kernel to read directories into kernel space or
|
||||
* to have different dirent layouts depending on the binary type.
|
||||
* Return 'true' to keep going and 'false' if there are no more entries.
|
||||
*/
|
||||
struct dir_context;
|
||||
typedef int (*filldir_t)(struct dir_context *, const char *, int, loff_t, u64,
|
||||
typedef bool (*filldir_t)(struct dir_context *, const char *, int, loff_t, u64,
|
||||
unsigned);
|
||||
|
||||
struct dir_context {
|
||||
@@ -3540,17 +3541,17 @@ static inline bool dir_emit(struct dir_context *ctx,
|
||||
const char *name, int namelen,
|
||||
u64 ino, unsigned type)
|
||||
{
|
||||
return ctx->actor(ctx, name, namelen, ctx->pos, ino, type) == 0;
|
||||
return ctx->actor(ctx, name, namelen, ctx->pos, ino, type);
|
||||
}
|
||||
static inline bool dir_emit_dot(struct file *file, struct dir_context *ctx)
|
||||
{
|
||||
return ctx->actor(ctx, ".", 1, ctx->pos,
|
||||
file->f_path.dentry->d_inode->i_ino, DT_DIR) == 0;
|
||||
file->f_path.dentry->d_inode->i_ino, DT_DIR);
|
||||
}
|
||||
static inline bool dir_emit_dotdot(struct file *file, struct dir_context *ctx)
|
||||
{
|
||||
return ctx->actor(ctx, "..", 2, ctx->pos,
|
||||
parent_ino(file->f_path.dentry), DT_DIR) == 0;
|
||||
parent_ino(file->f_path.dentry), DT_DIR);
|
||||
}
|
||||
static inline bool dir_emit_dots(struct file *file, struct dir_context *ctx)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user