The patch titled

     deprecate open("foo", 3)

has been added to the -mm tree.  Its filename is

     deprecate-openfoo-3.patch

Patches currently in -mm which might be from [EMAIL PROTECTED] are

proc-link-count-fix.patch
remove-ia_attr_flags.patch
namei-cleanup.patch
use-get_fs_struct-in-proc.patch
fix-enum-pid_directory_inos-in-proc-basec.patch
remove-duplicated-code-from-proc-and-ptrace.patch
remove-duplicated-sys_open32-code-from-64bit-archs.patch
cifs_create-fix.patch
deprecate-openfoo-3.patch
pivot_root-circular-reference-fix-3.patch
fuse-maintainers-kconfig-and-makefile-changes.patch
fuse-core.patch
fuse-device-functions.patch
fuse-device-functions-document-mount-options.patch
fuse-device-functions-document-mount-options-documentation-update.patch
fuse-device-functions-request-counter-overflow-fix.patch
fuse-device-functions-module-alias.patch
fuse-read-only-operations.patch
fuse-read-only-operations-follow_link-fix.patch
fuse-read-write-operations.patch
fuse-file-operations.patch
fuse-mount-options.patch
fuse-extended-attribute-operations.patch
fuse-add-padding.patch
fuse-readpages-operation.patch
fuse-tighten-check-for-processes-allowed-access.patch
fuse-stricter-mount-option-checking.patch
fuse-direct-i-o.patch
fuse-direct-i-o-cleanup.patch
fuse-transfer-readdir-data-through-device.patch
fuse-dont-update-file-times.patch
fuse-add-fsync-operation-for-directories.patch
fuse-dont-allow-restarting-of-system-calls.patch



From: Miklos Szeredi <[EMAIL PROTECTED]>

Deprecate access mode of '3' in open() as suggested by Linus.

Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Cc: Christoph Hellwig <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 fs/open.c |   13 +++++++++++++
 1 files changed, 13 insertions(+)

diff -puN fs/open.c~deprecate-openfoo-3 fs/open.c
--- 25/fs/open.c~deprecate-openfoo-3    Mon Aug 29 14:23:45 2005
+++ 25-akpm/fs/open.c   Mon Aug 29 14:23:45 2005
@@ -755,6 +755,19 @@ struct file *filp_open(const char * file
 {
        int namei_flags, error;
        struct nameidata nd;
+       static int warned;
+
+       /*
+        * Access mode of 3 had some old uses, that are probably not
+        * applicable anymore.  For now just warn about deprecation.
+        * Later it can be changed to return -EINVAL.
+        */
+       if ((flags & O_ACCMODE) == 3 && warned < 5) {
+               warned++;
+               printk(KERN_WARNING "Warning: '%s' (pid=%i) uses deprecated "
+                               "open flags, please report!\n",
+                       current->comm, current->tgid);
+       }
 
        namei_flags = flags;
        if ((namei_flags+1) & O_ACCMODE)
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to