diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-25 15:40:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-25 15:40:32 -0400 |
commit | 625bba662c17e917e164dc37f61aebbc49987ed6 (patch) | |
tree | d8a373269a58197e45b932f65b41044390b0071a /include | |
parent | b8e6dece3746902c29a4f0007c062641fa5dcc2d (diff) | |
parent | cff2fce58b2b0f59089e7edcdc38803d65057b9f (diff) |
Merge tag 'locks-v3.15-2' of git://git.samba.org/jlayton/linux
Pull file locking fixes from Jeff Layton:
"File locking related bugfixes for v3.15 (pile #2)
- fix for a long-standing bug in __break_lease that can cause soft
lockups
- renaming of file-private locks to "open file description" locks,
and the command macros to more visually distinct names
The fix for __break_lease is also in the pile of patches for which
Bruce sent a pull request, but I assume that your merge procedure will
handle that correctly.
For the other patches, I don't like the fact that we need to rename
this stuff at this late stage, but it should be settled now
(hopefully)"
* tag 'locks-v3.15-2' of git://git.samba.org/jlayton/linux:
locks: rename FL_FILE_PVT and IS_FILE_PVT to use "*_OFDLCK" instead
locks: rename file-private locks to "open file description locks"
locks: allow __break_lease to sleep even when break_time is 0
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 2 | ||||
-rw-r--r-- | include/uapi/asm-generic/fcntl.h | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 7a9c5bca2b76..878031227c57 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -815,7 +815,7 @@ static inline struct file *get_file(struct file *f) | |||
815 | #define FL_SLEEP 128 /* A blocking lock */ | 815 | #define FL_SLEEP 128 /* A blocking lock */ |
816 | #define FL_DOWNGRADE_PENDING 256 /* Lease is being downgraded */ | 816 | #define FL_DOWNGRADE_PENDING 256 /* Lease is being downgraded */ |
817 | #define FL_UNLOCK_PENDING 512 /* Lease is being broken */ | 817 | #define FL_UNLOCK_PENDING 512 /* Lease is being broken */ |
818 | #define FL_FILE_PVT 1024 /* lock is private to the file */ | 818 | #define FL_OFDLCK 1024 /* lock is "owned" by struct file */ |
819 | 819 | ||
820 | /* | 820 | /* |
821 | * Special return value from posix_lock_file() and vfs_lock_file() for | 821 | * Special return value from posix_lock_file() and vfs_lock_file() for |
diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h index a9b13f8b3595..7543b3e51331 100644 --- a/include/uapi/asm-generic/fcntl.h +++ b/include/uapi/asm-generic/fcntl.h | |||
@@ -133,20 +133,20 @@ | |||
133 | #endif | 133 | #endif |
134 | 134 | ||
135 | /* | 135 | /* |
136 | * fd "private" POSIX locks. | 136 | * Open File Description Locks |
137 | * | 137 | * |
138 | * Usually POSIX locks held by a process are released on *any* close and are | 138 | * Usually record locks held by a process are released on *any* close and are |
139 | * not inherited across a fork(). | 139 | * not inherited across a fork(). |
140 | * | 140 | * |
141 | * These cmd values will set locks that conflict with normal POSIX locks, but | 141 | * These cmd values will set locks that conflict with process-associated |
142 | * are "owned" by the opened file, not the process. This means that they are | 142 | * record locks, but are "owned" by the open file description, not the |
143 | * inherited across fork() like BSD (flock) locks, and they are only released | 143 | * process. This means that they are inherited across fork() like BSD (flock) |
144 | * automatically when the last reference to the the open file against which | 144 | * locks, and they are only released automatically when the last reference to |
145 | * they were acquired is put. | 145 | * the the open file against which they were acquired is put. |
146 | */ | 146 | */ |
147 | #define F_GETLKP 36 | 147 | #define F_OFD_GETLK 36 |
148 | #define F_SETLKP 37 | 148 | #define F_OFD_SETLK 37 |
149 | #define F_SETLKPW 38 | 149 | #define F_OFD_SETLKW 38 |
150 | 150 | ||
151 | #define F_OWNER_TID 0 | 151 | #define F_OWNER_TID 0 |
152 | #define F_OWNER_PID 1 | 152 | #define F_OWNER_PID 1 |