Re: [PATCH] fcntl returns wrong error code (Updated)

Christopher Yeoh (cyeoh@samba.org)
Fri, 22 Mar 2002 13:56:33 +1100


At 2002/3/22 00:58+1100 Christopher Yeoh writes:
> btw Stephen Rothwell pointed out that there is a much neater way to
> achieve the same change. I'll post a new patch in the morning.

This is the updated patch.

--- linux-2.4.18/fs/fcntl.c~ Fri Mar 22 11:54:35 2002
+++ linux-2.4.18/fs/fcntl.c Fri Mar 22 12:31:18 2002
@@ -66,6 +66,10 @@

write_lock(&files->file_lock);

+ error = -EINVAL;
+ if (orig_start >= current->rlim[RLIMIT_NOFILE].rlim_cur)
+ goto out;
+
repeat:
/*
* Someone might have closed fd's in the range
-
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/