lkml.org 
[lkml]   [2007]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectgeneric_setlease and tmpfs -- LTP fcntl failure
Date
In debugging a LTP failure related to fcntl on tmpfs it appears that  
we aren't able to use fcntl(fd, F_SETLEASE, F_WRLCK). In the
debugging it looks like we artificial increase the dentry->d_count
and so generic_setlease() always fails with -EAGAIN since it appears
dentry->d_count will be 2.

This is my first time delving into fs code so I'm not that familiar
with why tmpfs is artificially increasing the d_count. I was
wondering what a possible solution would be.

Maybe something like:

shmem_setlease(...) {
if (arg == F_WRLCK) {
dput(dentry)
generic_setlease(...)
dget(dentry)
} else {
generic_setlease(...)
}
}

Not sure what harm doing the dput() / dget() will have.

- k
-
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: 2007-11-14 22:21    [W:0.027 / U:0.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site