diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2026-03-12 20:44:42 +0300 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2026-03-12 20:44:42 +0300 |
| commit | 0421ccdfad0d92713a812a5aeb7d07b0ea7213c8 (patch) | |
| tree | 9a648660192c72df7e815216f0908fdabc735f0c /include/linux/lockd | |
| parent | 6d4b67a2a76a4ff2393fe88119ae4332821b82b4 (diff) | |
| parent | 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681 (diff) | |
| download | linux-0421ccdfad0d92713a812a5aeb7d07b0ea7213c8.tar.xz | |
Merge tag 'v7.0-rc3' into next
Sync up with the mainline to brig up the latest changes, specifically
changes to ALPS driver.
Diffstat (limited to 'include/linux/lockd')
| -rw-r--r-- | include/linux/lockd/lockd.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index c8f0f9458f2c..330e38776bb2 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h @@ -12,6 +12,7 @@ /* XXX: a lot of this should really be under fs/lockd. */ +#include <linux/exportfs.h> #include <linux/in.h> #include <linux/in6.h> #include <net/ipv6.h> @@ -307,7 +308,7 @@ void nlmsvc_invalidate_all(void); int nlmsvc_unlock_all_by_sb(struct super_block *sb); int nlmsvc_unlock_all_by_ip(struct sockaddr *server_addr); -static inline struct file *nlmsvc_file_file(struct nlm_file *file) +static inline struct file *nlmsvc_file_file(const struct nlm_file *file) { return file->f_file[O_RDONLY] ? file->f_file[O_RDONLY] : file->f_file[O_WRONLY]; @@ -318,6 +319,12 @@ static inline struct inode *nlmsvc_file_inode(struct nlm_file *file) return file_inode(nlmsvc_file_file(file)); } +static inline bool +nlmsvc_file_cannot_lock(const struct nlm_file *file) +{ + return exportfs_cannot_lock(nlmsvc_file_file(file)->f_path.dentry->d_sb->s_export_op); +} + static inline int __nlm_privileged_request4(const struct sockaddr *sap) { const struct sockaddr_in *sin = (struct sockaddr_in *)sap; |
