[lkml]   [2003]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] fs/locks.c fcntl_setlease did not check if a file was opened for writing before granting a read lease
>> But I THINK this is how a patch would fix the problem, in theory.

> Sorry, it won't.
> To detect if anyone has the file open for writing, you'll a new count
> field which keeps track of writer references. Something like this:
> if ((arg == F_RDLCK)
> && ((atomic_read(&inode->i_writer_count) != 0)))
> You'll also need to modify all the places where that needs to be
> maintained.

Well, dang it all. Why didn't they guy who implemented leasing in the first
place bother to do it right the first time?

I don't have the time or technical expertise in kernel development to go
through all that. Somebody else is going to have to pick up his slack.

Joseph D. Wagner

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:58    [W:0.041 / U:14.520 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site