diff options
| author | Jeff Layton <[email protected]> | 2014-03-04 15:30:23 +0000 |
|---|---|---|
| committer | Jeff Layton <[email protected]> | 2014-03-31 12:24:43 +0000 |
| commit | 90478939dce096ed5b239cad16237dca0a59d66f (patch) | |
| tree | 743b3d825bc56bd1c0ab4d9487abba7b6883af86 /fs/jbd2/commit.c | |
| parent | locks: add new fcntl cmd values for handling file private locks (diff) | |
| download | kernel-90478939dce096ed5b239cad16237dca0a59d66f.tar.gz kernel-90478939dce096ed5b239cad16237dca0a59d66f.zip | |
locks: require that flock->l_pid be set to 0 for file-private locks
Neil Brown suggested potentially overloading the l_pid value as a "lock
context" field for file-private locks. While I don't think we will
probably want to do that here, it's probably a good idea to ensure that
in the future we could extend this API without breaking existing
callers.
Typically the l_pid value is ignored for incoming struct flock
arguments, serving mainly as a place to return the pid of the owner if
there is a conflicting lock. For file-private locks, require that it
currently be set to 0 and return EINVAL if it isn't. If we eventually
want to make a non-zero l_pid mean something, then this will help ensure
that we don't break legacy programs that are using file-private locks.
Cc: Neil Brown <[email protected]>
Signed-off-by: Jeff Layton <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions
