Skip to content

Commit 9a7f12e

Browse files
esyr-rhaxboe
authored andcommitted
fcntl: fix typo in RWH_WRITE_LIFE_NOT_SET r/w hint name
According to commit message in the original commit c75b1d9 ("fs: add fcntl() interface for setting/getting write life time hints"), as well as userspace library[1] and man page update[2], R/W hint constants are intended to have RWH_* prefix. However, RWF_WRITE_LIFE_NOT_SET retained "RWF_*" prefix used in the early versions of the proposed patch set[3]. Rename it and provide the old name as a synonym for the new one for backward compatibility. [1] axboe/fio@bd553af6c849 [2] mkerrisk/man-pages@580082a186fd [3] https://www.mail-archive.com/linux-block@vger.kernel.org/msg09638.html Fixes: c75b1d9 ("fs: add fcntl() interface for setting/getting write life time hints") Acked-by: Song Liu <songliubraving@fb.com> Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent d386732 commit 9a7f12e

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

‎fs/fcntl.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ static int f_getowner_uids(struct file *filp, unsigned long arg)
261261
static bool rw_hint_valid(enum rw_hint hint)
262262
{
263263
switch (hint) {
264-
case RWF_WRITE_LIFE_NOT_SET:
264+
case RWH_WRITE_LIFE_NOT_SET:
265265
case RWH_WRITE_LIFE_NONE:
266266
case RWH_WRITE_LIFE_SHORT:
267267
case RWH_WRITE_LIFE_MEDIUM:

‎include/uapi/linux/fcntl.h‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,20 @@
5858
* Valid hint values for F_{GET,SET}_RW_HINT. 0 is "not set", or can be
5959
* used to clear any hints previously set.
6060
*/
61-
#define RWF_WRITE_LIFE_NOT_SET 0
61+
#define RWH_WRITE_LIFE_NOT_SET 0
6262
#define RWH_WRITE_LIFE_NONE 1
6363
#define RWH_WRITE_LIFE_SHORT 2
6464
#define RWH_WRITE_LIFE_MEDIUM 3
6565
#define RWH_WRITE_LIFE_LONG 4
6666
#define RWH_WRITE_LIFE_EXTREME 5
6767

68+
/*
69+
* The originally introduced spelling is remained from the first
70+
* versions of the patch set that introduced the feature, see commit
71+
* v4.13-rc1~212^2~51.
72+
*/
73+
#define RWF_WRITE_LIFE_NOT_SET RWH_WRITE_LIFE_NOT_SET
74+
6875
/*
6976
* Types of directory notifications that may be requested.
7077
*/

‎tools/include/uapi/linux/fcntl.h‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,20 @@
5858
* Valid hint values for F_{GET,SET}_RW_HINT. 0 is "not set", or can be
5959
* used to clear any hints previously set.
6060
*/
61-
#define RWF_WRITE_LIFE_NOT_SET 0
61+
#define RWH_WRITE_LIFE_NOT_SET 0
6262
#define RWH_WRITE_LIFE_NONE 1
6363
#define RWH_WRITE_LIFE_SHORT 2
6464
#define RWH_WRITE_LIFE_MEDIUM 3
6565
#define RWH_WRITE_LIFE_LONG 4
6666
#define RWH_WRITE_LIFE_EXTREME 5
6767

68+
/*
69+
* The originally introduced spelling is remained from the first
70+
* versions of the patch set that introduced the feature, see commit
71+
* v4.13-rc1~212^2~51.
72+
*/
73+
#define RWF_WRITE_LIFE_NOT_SET RWH_WRITE_LIFE_NOT_SET
74+
6875
/*
6976
* Types of directory notifications that may be requested.
7077
*/

0 commit comments

Comments
 (0)