Thread (27 messages) 27 messages, 4 authors, 2021-08-26

Re: [PATCH 5/8] Keep read and write fds with each nlm_file

From: Bruce Fields <hidden>
Date: 2021-08-23 21:58:48

On Mon, Aug 23, 2021 at 09:54:20PM +0000, Chuck Lever III wrote:
quoted
On Aug 23, 2021, at 4:44 PM, Bruce Fields [off-list ref] wrote:
+static int nlm_unlock_files(struct nlm_file *file)
+{
+	struct file_lock lock;
+	struct file *f;
+
+	lock.fl_type  = F_UNLCK;
+	lock.fl_start = 0;
+	lock.fl_end   = OFFSET_MAX;
+	for (f = file->f_file[0]; f <= file->f_file[1]; f++) {
O_RDONLY and O_WRONLY ?
I thought they looked weird as loop boundaries.
quoted
@@ -301,7 +305,8 @@ int           nlmsvc_unlock_all_by_ip(struct sockaddr *server_addr);
static inline struct inode *nlmsvc_file_inode(struct nlm_file *file)
{
-	return locks_inode(file->f_file);
+	return locks_inode(file->f_file[0] ?
+				file->f_file[0] : file->f_file[1]);
O_RDONLY and O_WRONLY ?
A little less weird.

OK, I admit, "looks weird" isn't much of an argument.

I say we leave it to whoever cares enough to make the change.

--b.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help