lkml.org 
[lkml]   [2003]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] fs/locks.c fcntl_setlease did not check if a file was opened for writing before granting a read lease
Date
>> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.044 / U:1.248 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site