Merge tag 'for-6.1/io_uring-2022-10-03' of git://git.kernel.dk/linux
[platform/kernel/linux-rpi.git] / include / linux / fs.h
index 01681d0..619d683 100644 (file)
@@ -1472,7 +1472,7 @@ struct super_block {
        const struct xattr_handler **s_xattr;
 #ifdef CONFIG_FS_ENCRYPTION
        const struct fscrypt_operations *s_cop;
-       struct key              *s_master_keys; /* master crypto keys in use */
+       struct fscrypt_keyring  *s_master_keys; /* master crypto keys in use */
 #endif
 #ifdef CONFIG_FS_VERITY
        const struct fsverity_operations *s_vop;
@@ -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 {
@@ -2373,13 +2374,14 @@ static inline void kiocb_clone(struct kiocb *kiocb, struct kiocb *kiocb_src,
  *                     don't have to write inode on fdatasync() when only
  *                     e.g. the timestamps have changed.
  * I_DIRTY_PAGES       Inode has dirty pages.  Inode itself may be clean.
- * I_DIRTY_TIME                The inode itself only has dirty timestamps, and the
+ * I_DIRTY_TIME                The inode itself has dirty timestamps, and the
  *                     lazytime mount option is enabled.  We keep track of this
  *                     separately from I_DIRTY_SYNC in order to implement
  *                     lazytime.  This gets cleared if I_DIRTY_INODE
- *                     (I_DIRTY_SYNC and/or I_DIRTY_DATASYNC) gets set.  I.e.
- *                     either I_DIRTY_TIME *or* I_DIRTY_INODE can be set in
- *                     i_state, but not both.  I_DIRTY_PAGES may still be set.
+ *                     (I_DIRTY_SYNC and/or I_DIRTY_DATASYNC) gets set. But
+ *                     I_DIRTY_TIME can still be set if I_DIRTY_SYNC is already
+ *                     in place because writeback might already be in progress
+ *                     and we don't want to lose the time update
  * I_NEW               Serves as both a mutex and completion notification.
  *                     New inodes set I_NEW.  If two processes both create
  *                     the same inode, one of them will release its inode and
@@ -3542,17 +3544,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)
 {