patch-2.1.31 linux/fs/open.c

Next file: linux/fs/pipe.c
Previous file: linux/fs/ncpfs/sock.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.30/linux/fs/open.c linux/fs/open.c
@@ -675,14 +675,17 @@
 
 #endif
 
-void __fput(struct file *filp, struct inode *inode)
+int __fput(struct file *filp, struct inode *inode)
 {
+	int	error = 0;
+
 	if (filp->f_op && filp->f_op->release)
-		filp->f_op->release(inode,filp);
+		error = filp->f_op->release(inode,filp);
 	filp->f_inode = NULL;
 	if (filp->f_mode & FMODE_WRITE)
 		put_write_access(inode);
 	iput(inode);
+	return error;
 }
 
 int close_fp(struct file *filp)
@@ -696,8 +699,7 @@
 	inode = filp->f_inode;
 	if (inode)
 		locks_remove_locks(current, filp);
-	fput(filp, inode);
-	return 0;
+	return fput(filp, inode);
 }
 
 asmlinkage int sys_close(unsigned int fd)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov