mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
fs: remove fs.f_write_hint
The value is now completely unused except for reporting it back through the F_GET_FILE_RW_HINT ioctl, so remove the value and the two ioctls for it. Trying to use the F_SET_FILE_RW_HINT and F_GET_FILE_RW_HINT fcntls will now return EINVAL, just like it would on a kernel that never supported this functionality in the first place. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Link: https://lore.kernel.org/r/20220308060529.736277-3-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
41d36a9f3e
commit
7b12e49669
@@ -966,7 +966,6 @@ struct file {
|
||||
* Must not be taken from IRQ context.
|
||||
*/
|
||||
spinlock_t f_lock;
|
||||
enum rw_hint f_write_hint;
|
||||
atomic_long_t f_count;
|
||||
unsigned int f_flags;
|
||||
fmode_t f_mode;
|
||||
@@ -2214,14 +2213,6 @@ static inline bool HAS_UNMAPPED_ID(struct user_namespace *mnt_userns,
|
||||
!gid_valid(i_gid_into_mnt(mnt_userns, inode));
|
||||
}
|
||||
|
||||
static inline enum rw_hint file_write_hint(struct file *file)
|
||||
{
|
||||
if (file->f_write_hint != WRITE_LIFE_NOT_SET)
|
||||
return file->f_write_hint;
|
||||
|
||||
return file_inode(file)->i_write_hint;
|
||||
}
|
||||
|
||||
static inline int iocb_flags(struct file *file);
|
||||
|
||||
static inline void init_sync_kiocb(struct kiocb *kiocb, struct file *filp)
|
||||
|
||||
Reference in New Issue
Block a user