11 Dec, 2006

1 commit

  • Currently, each fdtable supports three dynamically-sized arrays of data: the
    fdarray and two fdsets. The code allows the number of fds supported by the
    fdarray (fdtable->max_fds) to differ from the number of fds supported by each
    of the fdsets (fdtable->max_fdset).

    In practice, it is wasteful for these two sizes to differ: whenever we hit a
    limit on the smaller-capacity structure, we will reallocate the entire fdtable
    and all the dynamic arrays within it, so any delta in the memory used by the
    larger-capacity structure will never be touched at all.

    Rather than hogging this excess, we shouldn't even allocate it in the first
    place, and keep the capacities of the fdarray and the fdsets equal. This
    patch removes fdtable->max_fdset. As an added bonus, most of the supporting
    code becomes simpler.

    Signed-off-by: Vadim Lobanov
    Cc: Christoph Hellwig
    Cc: Al Viro
    Cc: Dipankar Sarma
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vadim Lobanov
     

09 Dec, 2006

2 commits

  • This patch changes struct file to use struct path instead of having
    independent pointers to struct dentry and struct vfsmount, and converts all
    users of f_{dentry,vfsmnt} in fs/ to use f_path.{dentry,mnt}.

    Additionally, it adds two #define's to make the transition easier for users of
    the f_dentry and f_vfsmnt.

    Signed-off-by: Josef "Jeff" Sipek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josef "Jeff" Sipek
     
  • Fix the locking of signal->tty.

    Use ->sighand->siglock to protect ->signal->tty; this lock is already used
    by most other members of ->signal/->sighand. And unless we are 'current'
    or the tasklist_lock is held we need ->siglock to access ->signal anyway.

    (NOTE: sys_unshare() is broken wrt ->sighand locking rules)

    Note that tty_mutex is held over tty destruction, so while holding
    tty_mutex any tty pointer remains valid. Otherwise the lifetime of ttys
    are governed by their open file handles. This leaves some holes for tty
    access from signal->tty (or any other non file related tty access).

    It solves the tty SLAB scribbles we were seeing.

    (NOTE: the change from group_send_sig_info to __group_send_sig_info needs to
    be examined by someone familiar with the security framework, I think
    it is safe given the SEND_SIG_PRIV from other __group_send_sig_info
    invocations)

    [schwidefsky@de.ibm.com: 3270 fix]
    [akpm@osdl.org: various post-viro fixes]
    Signed-off-by: Peter Zijlstra
    Acked-by: Alan Cox
    Cc: Oleg Nesterov
    Cc: Prarit Bhargava
    Cc: Chris Wright
    Cc: Roland McGrath
    Cc: Stephen Smalley
    Cc: James Morris
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Martin Schwidefsky
    Cc: Jan Kara
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

01 Oct, 2006

2 commits


30 Sep, 2006

2 commits

  • The problem is that close() syscalls can call a file system's flush
    handler, which in turn might sleep interruptibly and ultimately pass back
    an -ERESTARTSYS return value. This happens for files backed by an
    interruptible NFS mount under nfs_file_flush() when a large file has just
    been written and nfs_wait_bit_interruptible() detects that there is a
    signal pending.

    I have a test case where the "strace" command is used to attach to a
    process sleeping in such a close(). Since the SIGSTOP is forced onto the
    victim process (removing it from the thread's "blocked" mask in
    force_sig_info()), the RPC wait is interrupted and the close() is
    terminated early.

    But the file table entry has already been cleared before the flush handler
    was called. Thus, when the syscall is restarted, the file descriptor
    appears closed and an EBADF error is returned (which is wrong). What's
    worse, there is the hypothetical case where another thread of a
    multi-threaded application might have reused the file descriptor, in which
    case that file would be mistakenly closed.

    The bottom line is that close() syscalls are not restartable, and thus
    -ERESTARTSYS return values should be mapped to -EINTR. This is consistent
    with the close(2) manual page. The fix is below.

    Signed-off-by: Ernie Petrides
    Cc: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ernie Petrides
     
  • In the "operation does permission checking" model used by fuse, chdir
    permission is not checked, since there's no chdir method.

    For this case set a lookup flag, which will be passed to ->permission(), so
    fuse can distinguish it from permission checks for other operations.

    Signed-off-by: Miklos Szeredi
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     

26 Jun, 2006

1 commit

  • In the course of trying to track down a bug where a file mtime was not
    being updated correctly, it was discovered that the m/ctime updates were
    not quite being handled correctly for ftruncate() calls.

    Quoth SUSv3:

    open(2):

    If O_TRUNC is set and the file did previously exist, upon
    successful completion, open() shall mark for update the st_ctime
    and st_mtime fields of the file.

    truncate(2):

    Upon successful completion, if the file size is changed, this
    function shall mark for update the st_ctime and st_mtime fields
    of the file, and the S_ISUID and S_ISGID bits of the file mode
    may be cleared.

    ftruncate(2):

    Upon successful completion, if fildes refers to a regular file,
    the ftruncate() function shall mark for update the st_ctime and
    st_mtime fields of the file and the S_ISUID and S_ISGID bits of
    the file mode may be cleared. If the ftruncate() function is
    unsuccessful, the file is unaffected.

    The open(O_TRUNC) and truncate cases were being handled correctly, but the
    ftruncate case was being handled like the truncate case. The semantics of
    truncate and ftruncate don't quite match, so ftruncate needs to be handled
    slightly differently.

    The attached patch addresses this issue for ftruncate(2).

    My thanx to Stephen Tweedie and Trond Myklebust for their help in
    understanding the situation and semantics.

    Signed-off-by: Peter Staubach
    Cc: "Stephen C. Tweedie"
    Cc: Trond Myklebust
    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Staubach
     

23 Jun, 2006

2 commits

  • Pass the POSIX lock owner ID to the flush operation.

    This is useful for filesystems which don't want to store any locking state
    in inode->i_flock but want to handle locking/unlocking POSIX locks
    internally. FUSE is one such filesystem but I think it possible that some
    network filesystems would need this also.

    Also add a flag to indicate that a POSIX locking request was generated by
    close(), so filesystems using the above feature won't send an extra locking
    request in this case.

    Signed-off-by: Miklos Szeredi
    Cc: Trond Myklebust
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • Give the statfs superblock operation a dentry pointer rather than a superblock
    pointer.

    This complements the get_sb() patch. That reduced the significance of
    sb->s_root, allowing NFS to place a fake root there. However, NFS does
    require a dentry to use as a target for the statfs operation. This permits
    the root in the vfsmount to be used instead.

    linux/mount.h has been added where necessary to make allyesconfig build
    successfully.

    Interest has also been expressed for use with the FUSE and XFS filesystems.

    Signed-off-by: David Howells
    Acked-by: Al Viro
    Cc: Nathan Scott
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

20 Jun, 2006

1 commit

  • When an audit event involves changes to a directory entry, include
    a PATH record for the directory itself. A few other notable changes:

    - fixed audit_inode_child() hooks in fsnotify_move()
    - removed unused flags arg from audit_inode()
    - added audit log routines for logging a portion of a string

    Here's some sample output.

    before patch:
    type=SYSCALL msg=audit(1149821605.320:26): arch=40000003 syscall=39 success=yes exit=0 a0=bf8d3c7c a1=1ff a2=804e1b8 a3=bf8d3c7c items=1 ppid=739 pid=800 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttyS0 comm="mkdir" exe="/bin/mkdir" subj=root:system_r:unconfined_t:s0-s0:c0.c255
    type=CWD msg=audit(1149821605.320:26): cwd="/root"
    type=PATH msg=audit(1149821605.320:26): item=0 name="foo" parent=164068 inode=164010 dev=03:00 mode=040755 ouid=0 ogid=0 rdev=00:00 obj=root:object_r:user_home_t:s0

    after patch:
    type=SYSCALL msg=audit(1149822032.332:24): arch=40000003 syscall=39 success=yes exit=0 a0=bfdd9c7c a1=1ff a2=804e1b8 a3=bfdd9c7c items=2 ppid=714 pid=777 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttyS0 comm="mkdir" exe="/bin/mkdir" subj=root:system_r:unconfined_t:s0-s0:c0.c255
    type=CWD msg=audit(1149822032.332:24): cwd="/root"
    type=PATH msg=audit(1149822032.332:24): item=0 name="/root" inode=164068 dev=03:00 mode=040750 ouid=0 ogid=0 rdev=00:00 obj=root:object_r:user_home_dir_t:s0
    type=PATH msg=audit(1149822032.332:24): item=1 name="foo" inode=164010 dev=03:00 mode=040755 ouid=0 ogid=0 rdev=00:00 obj=root:object_r:user_home_t:s0

    Signed-off-by: Amy Griffis
    Signed-off-by: Al Viro

    Amy Griffis
     

16 May, 2006

1 commit


19 Apr, 2006

2 commits

  • Came up through a quick grep for other cases similar to the ftruncate()
    one in commit 0a489cb3b6a7b277030cdbc97c2c65905db94536.

    Also, add a comment, so that people who read the code understand why we
    do what looks like a no-op.

    (Again, this won't actually matter to any sane user, since libc will
    save and restore the register gcc stomps on, but it's still wrong to
    stomp on it)

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Gcc thinks it owns the incoming argument stack, but that's not true for
    "asmlinkage" functions, and it corrupts the caller-set-up argument stack
    when it pushes the third argument onto the stack. Which can result in
    %ebx getting corrupted in user space.

    Now, normally nobody sane would ever notice, since libc will save and
    restore %ebx anyway over the system call, but it's still wrong.

    I'd much rather have "asmlinkage" tell gcc directly that it doesn't own
    the stack, but no such attribute exists, so we're stuck with our hacky
    manual "prevent_tail_call()" macro once more (we've had the same issue
    before with sys_waitpid() and sys_wait4()).

    Thanks to Hans-Werner Hilse for reporting
    the issue and testing the fix.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

26 Mar, 2006

2 commits

  • * 'audit.b3' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current: (22 commits)
    [PATCH] fix audit_init failure path
    [PATCH] EXPORT_SYMBOL patch for audit_log, audit_log_start, audit_log_end and audit_format
    [PATCH] sem2mutex: audit_netlink_sem
    [PATCH] simplify audit_free() locking
    [PATCH] Fix audit operators
    [PATCH] promiscuous mode
    [PATCH] Add tty to syscall audit records
    [PATCH] add/remove rule update
    [PATCH] audit string fields interface + consumer
    [PATCH] SE Linux audit events
    [PATCH] Minor cosmetic cleanups to the code moved into auditfilter.c
    [PATCH] Fix audit record filtering with !CONFIG_AUDITSYSCALL
    [PATCH] Fix IA64 success/failure indication in syscall auditing.
    [PATCH] Miscellaneous bug and warning fixes
    [PATCH] Capture selinux subject/object context information.
    [PATCH] Exclude messages by message type
    [PATCH] Collect more inode information during syscall processing.
    [PATCH] Pass dentry, not just name, in fsnotify creation hooks.
    [PATCH] Define new range of userspace messages.
    [PATCH] Filter rule comparators
    ...

    Fixed trivial conflict in security/selinux/hooks.c

    Linus Torvalds
     
  • I think it would be nice to put an usage warning in header of
    lookup_instantiate_filp() to indicate it is unsafe to use it on anything
    but regular files (even that is potentially unsafe, but there your ->open()
    is usually in your hands anyway), so that others won't fall into the same
    trap I did.

    Signed-off-by: Oleg Drokin
    Cc: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Drokin
     

23 Mar, 2006

1 commit

  • 1) Reduce the size of (struct fdtable) to exactly 64 bytes on 32bits
    platforms, lowering kmalloc() allocated space by 50%.

    2) Reduce the size of (files_struct), using a special 32 bits (or
    64bits) embedded_fd_set, instead of a 1024 bits fd_set for the
    close_on_exec_init and open_fds_init fields. This save some ram (248
    bytes per task) as most tasks dont open more than 32 files. D-Cache
    footprint for such tasks is also reduced to the minimum.

    3) Reduce size of allocated fdset. Currently two full pages are
    allocated, that is 32768 bits on x86 for example, and way too much. The
    minimum is now L1_CACHE_BYTES.

    UP and SMP should benefit from this patch, because most tasks will touch
    only one cache line when open()/close() stdin/stdout/stderr (0/1/2),
    (next_fd, close_on_exec_init, open_fds_init, fd_array[0 .. 2] being in the
    same cache line)

    Signed-off-by: Eric Dumazet
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Dumazet
     

21 Mar, 2006

1 commit

  • This patch augments the collection of inode info during syscall
    processing. It represents part of the functionality that was provided
    by the auditfs patch included in RHEL4.

    Specifically, it:

    - Collects information for target inodes created or removed during
    syscalls. Previous code only collects information for the target
    inode's parent.

    - Adds the audit_inode() hook to syscalls that operate on a file
    descriptor (e.g. fchown), enabling audit to do inode filtering for
    these calls.

    - Modifies filtering code to check audit context for either an inode #
    or a parent inode # matching a given rule.

    - Modifies logging to provide inode # for both parent and child.

    - Protect debug info from NULL audit_names.name.

    [AV: folded a later typo fix from the same author]

    Signed-off-by: Amy Griffis
    Signed-off-by: David Woodhouse
    Signed-off-by: Al Viro

    Amy Griffis
     

19 Jan, 2006

1 commit

  • Here is a series of patches which introduce in total 13 new system calls
    which take a file descriptor/filename pair instead of a single file
    name. These functions, openat etc, have been discussed on numerous
    occasions. They are needed to implement race-free filesystem traversal,
    they are necessary to implement a virtual per-thread current working
    directory (think multi-threaded backup software), etc.

    We have in glibc today implementations of the interfaces which use the
    /proc/self/fd magic. But this code is rather expensive. Here are some
    results (similar to what Jim Meyering posted before).

    The test creates a deep directory hierarchy on a tmpfs filesystem. Then
    rm -fr is used to remove all directories. Without syscall support I get
    this:

    real 0m31.921s
    user 0m0.688s
    sys 0m31.234s

    With syscall support the results are much better:

    real 0m20.699s
    user 0m0.536s
    sys 0m20.149s

    The interfaces are for obvious reasons currently not much used. But they'll
    be used. coreutils (and Jeff's posixutils) are already using them.
    Furthermore, code like ftw/fts in libc (maybe even glob) will also start using
    them. I expect a patch to make follow soon. Every program which is walking
    the filesystem tree will benefit.

    Signed-off-by: Ulrich Drepper
    Signed-off-by: Alexey Dobriyan
    Cc: Christoph Hellwig
    Cc: Al Viro
    Acked-by: Ingo Molnar
    Cc: Michael Kerrisk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ulrich Drepper
     

12 Jan, 2006

1 commit


10 Jan, 2006

1 commit


09 Jan, 2006

2 commits

  • uninline some open.c functions

    add/remove: 3/0 grow/shrink: 0/6 up/down: 679/-1166 (-487)
    function old new delta
    do_sys_truncate - 336 +336
    do_sys_ftruncate - 317 +317
    __put_unused_fd - 26 +26
    put_unused_fd 57 49 -8
    sys_close 150 119 -31
    sys_ftruncate64 260 26 -234
    sys_ftruncate 272 24 -248
    sys_truncate 339 25 -314
    sys_truncate64 336 5 -331

    Signed-off-by: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Mackall
     
  • SUS requires that when truncating a file to the size that it currently
    is:
    truncate and ftruncate should NOT modify ctime or mtime
    O_TRUNC SHOULD modify ctime and mtime.

    Currently mtime and ctime are always modified on most local
    filesystems (side effect of ->truncate) or never modified (on NFS).

    With this patch:
    ATTR_CTIME|ATTR_MTIME are sent with ATTR_SIZE precisely when
    an update of these times is required whether size changes or not
    (via a new argument to do_truncate). This allows NFS to do
    the right thing for O_TRUNC.
    inode_setattr nolonger forces ATTR_MTIME|ATTR_CTIME when the ATTR_SIZE
    sets the size to it's current value. This allows local filesystems
    to do the right thing for f?truncate.

    Also, the logic in inode_setattr is changed a bit so there are two return
    points. One returns the error from vmtruncate if it failed, the other
    returns 0 (there can be no other failure).

    Finally, if vmtruncate succeeds, and ATTR_SIZE is the only change
    requested, we now fall-through and mark_inode_dirty. If a filesystem did
    not have a ->truncate function, then vmtruncate will have changed i_size,
    without marking the inode as 'dirty', and I think this is wrong.

    Signed-off-by: Neil Brown
    Cc: Christoph Hellwig
    Cc: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     

09 Nov, 2005

2 commits

  • A few more callers of permission() just want to check for a different access
    pattern on an already open file. This patch adds a wrapper for permission()
    that takes a file in preparation of per-mount read-only support and to clean
    up the callers a little. The helper is not intended for new code, everything
    without the interface set in stone should use vfs_permission()

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Most permission() calls have a struct nameidata * available. This helper
    takes that as an argument and thus makes sure we pass it down for lookup
    intents and prepares for per-mount read-only support where we need a struct
    vfsmount for checking whether a file is writeable.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

07 Nov, 2005

2 commits

  • This patch extends the iattr structure with a file pointer memeber, and adds
    an ATTR_FILE validity flag for this member.

    This is set if do_truncate() is invoked from ftruncate() or from
    do_coredump().

    The change is source and binary compatible.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • There is a memory leak possible in dentry_open(). If get_empty_filp()
    fails, then the references to dentry and mnt need to be released. The
    attached patch adds the calls to dput() and mntput() to release these two
    references.

    Signed-off-by: Peter Staubach
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Staubach
     

19 Oct, 2005

1 commit


13 Sep, 2005

1 commit

  • When open(O_CREAT) is called and the error, ENFILE, is returned, the file
    may be created anyway. This is counter intuitive, against the SUS V3
    specification, and may cause applications to misbehave if they are not
    coded correctly to handle this semantic. The SUS V3 specification
    explicitly states "No files shall be created or modified if the function
    returns -1.".

    The error, ENFILE, is used to indicate the system wide open file table is
    full and no more file structs can be allocated.

    This is due to an ordering problem. The entry in the directory is created
    before the file struct is allocated. If the allocation for the file struct
    fails, then the system call must return an error, but the directory entry
    was already created and can not be safely removed.

    The solution to this situation is relatively easy. The file struct should
    be allocated before the directory entry is created. If the allocation
    fails, then the error can be returned directly. If the creation of the
    directory entry fails, then the file struct can be easily freed.

    Signed-off-by: Peter Staubach
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Staubach
     

10 Sep, 2005

2 commits

  • Patch to eliminate struct files_struct.file_lock spinlock on the reader side
    and use rcu refcounting rcuref_xxx api for the f_count refcounter. The
    updates to the fdtable are done by allocating a new fdtable structure and
    setting files->fdt to point to the new structure. The fdtable structure is
    protected by RCU thereby allowing lock-free lookup. For fd arrays/sets that
    are vmalloced, we use keventd to free them since RCU callbacks can't sleep. A
    global list of fdtable to be freed is not scalable, so we use a per-cpu list.
    If keventd is already handling the current cpu's work, we use a timer to defer
    queueing of that work.

    Since the last publication, this patch has been re-written to avoid using
    explicit memory barriers and use rcu_assign_pointer(), rcu_dereference()
    premitives instead. This required that the fd information is kept in a
    separate structure (fdtable) and updated atomically.

    Signed-off-by: Dipankar Sarma
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dipankar Sarma
     
  • In order for the RCU to work, the file table array, sets and their sizes must
    be updated atomically. Instead of ensuring this through too many memory
    barriers, we put the arrays and their sizes in a separate structure. This
    patch takes the first step of putting the file table elements in a separate
    structure fdtable that is embedded withing files_struct. It also changes all
    the users to refer to the file table using files_fdtable() macro. Subsequent
    applciation of RCU becomes easier after this.

    Signed-off-by: Dipankar Sarma
    Signed-Off-By: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dipankar Sarma
     

08 Sep, 2005

1 commit


13 Jul, 2005

1 commit

  • inotify is intended to correct the deficiencies of dnotify, particularly
    its inability to scale and its terrible user interface:

    * dnotify requires the opening of one fd per each directory
    that you intend to watch. This quickly results in too many
    open files and pins removable media, preventing unmount.
    * dnotify is directory-based. You only learn about changes to
    directories. Sure, a change to a file in a directory affects
    the directory, but you are then forced to keep a cache of
    stat structures.
    * dnotify's interface to user-space is awful. Signals?

    inotify provides a more usable, simple, powerful solution to file change
    notification:

    * inotify's interface is a system call that returns a fd, not SIGIO.
    You get a single fd, which is select()-able.
    * inotify has an event that says "the filesystem that the item
    you were watching is on was unmounted."
    * inotify can watch directories or files.

    Inotify is currently used by Beagle (a desktop search infrastructure),
    Gamin (a FAM replacement), and other projects.

    See Documentation/filesystems/inotify.txt.

    Signed-off-by: Robert Love
    Cc: John McCutchan
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert Love
     

24 Jun, 2005

4 commits

  • - generic_file* file operations do no longer have a xip/non-xip split
    - filemap_xip.c implements a new set of fops that require get_xip_page
    aop to work proper. all new fops are exported GPL-only (don't like to
    see whatever code use those except GPL modules)
    - __xip_unmap now uses page_check_address, which is no longer static
    in rmap.c, and defined in linux/rmap.h
    - mm/filemap.h is now much more clean, plainly having just Linus'
    inline funcs moved here from filemap.c
    - fix includes in filemap_xip to make it build cleanly on i386

    Signed-off-by: Carsten Otte
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Carsten Otte
     
  • Clean up tortured logic in sys_open().

    Signed-off-by: Telemaque Ndizihiwe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Telemaque Ndizihiwe
     
  • The following patch removes the f_error field and all checks of f_error.

    Trond said:

    f_error was introduced for NFS, and made sense when we were guaranteed
    always to have a file pointer around when write errors occurred. Since
    then, we have (for various reasons) had to introduce the nfs_open_context in
    order to track the file read/write state, and it made sense to move our
    f_error tracking there too.

    Signed-off-by: Christoph Lameter
    Acked-by: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • In ia64 kernel, the O_LARGEFILE flag is forced when opening a file. This
    is problematic for execution of 32 bit processes, which are not largefile
    aware, either by SW emulation or by HW execution.

    For such processes, the problem is two-fold:

    1) When trying to open a file that is larger than 4G
    the operation should fail, but it's not
    2) Writing to offset larger than 4G should fail, but
    it's not

    The proposed patch takes advantage of the way 32 bit processes are
    identified in ia64 systems. Such processes have PER_LINUX32 for their
    personality. With the patch, the ia64 kernel will not enforce the
    O_LARGEFILE flag if the current process has PER_LINUX32 set. The behavior
    for all other architectures remains unchanged.

    Signed-off-by: Yoav Zach
    Acked-by: Tony Luck
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoav Zach
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds