down(&nlm_file_sema);
for (file = nlm_files[hash]; file; file = file->f_next)
- if (!memcmp(&file->f_handle, f, sizeof(*f)))
+ if (!nfs_compare_fh(&file->f_handle, f))
goto found;
dprintk("lockd: creating file for (%08x %08x %08x %08x %08x %08x)\n",
static inline void
nlm_delete_file(struct nlm_file *file)
{
- struct inode *inode = file->f_file.f_dentry->d_inode;
+ struct inode *inode = file->f_file->f_dentry->d_inode;
struct nlm_file **fp, *f;
dprintk("lockd: closing file %s/%ld\n",
while ((f = *fp) != NULL) {
if (f == file) {
*fp = file->f_next;
- nlmsvc_ops->fclose(&file->f_file);
+ nlmsvc_ops->fclose(file->f_file);
kfree(file);
return;
}
lock.fl_type = F_UNLCK;
lock.fl_start = 0;
lock.fl_end = OFFSET_MAX;
- if (posix_lock_file(&file->f_file, &lock) < 0) {
+ if (posix_lock_file(file->f_file, &lock) < 0) {
printk("lockd: unlock failure in %s:%d\n",
__FILE__, __LINE__);
return 1;
if (!file->f_blocks && !file->f_locks
&& !file->f_shares && !file->f_count) {
*fp = file->f_next;
- nlmsvc_ops->fclose(&file->f_file);
+ nlmsvc_ops->fclose(file->f_file);
kfree(file);
} else {
fp = &file->f_next;