diff options
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -717,7 +717,7 @@ cleanup_all: | |||
717 | * here, so just reset the state. | 717 | * here, so just reset the state. |
718 | */ | 718 | */ |
719 | file_reset_write(f); | 719 | file_reset_write(f); |
720 | mnt_drop_write(f->f_path.mnt); | 720 | __mnt_drop_write(f->f_path.mnt); |
721 | } | 721 | } |
722 | } | 722 | } |
723 | cleanup_file: | 723 | cleanup_file: |
@@ -852,9 +852,10 @@ static inline int build_open_flags(int flags, umode_t mode, struct open_flags *o | |||
852 | int lookup_flags = 0; | 852 | int lookup_flags = 0; |
853 | int acc_mode; | 853 | int acc_mode; |
854 | 854 | ||
855 | if (!(flags & O_CREAT)) | 855 | if (flags & O_CREAT) |
856 | mode = 0; | 856 | op->mode = (mode & S_IALLUGO) | S_IFREG; |
857 | op->mode = mode; | 857 | else |
858 | op->mode = 0; | ||
858 | 859 | ||
859 | /* Must never be set by userspace */ | 860 | /* Must never be set by userspace */ |
860 | flags &= ~FMODE_NONOTIFY; | 861 | flags &= ~FMODE_NONOTIFY; |