Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125772
b: refs/heads/master
c: 4ac6032
h: refs/heads/master
v: v3
  • Loading branch information
Joel Becker authored and Mark Fasheh committed Jan 5, 2009
1 parent 9a7ba42 commit 5aedc94
Show file tree
Hide file tree
Showing 72 changed files with 301 additions and 205 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 520c85346666d4d9a6fcaaa8450542302dc28b91
refs/heads/master: 4ac6032d6c92f0ac65cf5bc56b68557b3f099b66
1 change: 1 addition & 0 deletions trunk/arch/powerpc/platforms/cell/spufs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ spufs_new_inode(struct super_block *sb, int mode)
inode->i_mode = mode;
inode->i_uid = current_fsuid();
inode->i_gid = current_fsgid();
inode->i_blocks = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
out:
return inode;
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/s390/hypfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ static struct inode *hypfs_make_inode(struct super_block *sb, int mode)
ret->i_mode = mode;
ret->i_uid = hypfs_info->uid;
ret->i_gid = hypfs_info->gid;
ret->i_blocks = 0;
ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME;
if (mode & S_IFDIR)
ret->i_nlink = 2;
Expand Down
25 changes: 14 additions & 11 deletions trunk/arch/um/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared/skas

include $(srctree)/$(ARCH_DIR)/Makefile-skas

SHARED_HEADERS := $(ARCH_DIR)/include/shared
ARCH_INCLUDE := -I$(srctree)/$(SHARED_HEADERS)
ARCH_INCLUDE := -I$(srctree)/$(ARCH_DIR)/include/shared
ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH)/shared
ifneq ($(KBUILD_SRC),)
ARCH_INCLUDE += -I$(SHARED_HEADERS)
ARCH_INCLUDE += -I$(ARCH_DIR)/include/shared # for two generated files
endif
KBUILD_CPPFLAGS += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH)

Expand Down Expand Up @@ -86,8 +85,8 @@ endef

KBUILD_KCONFIG := arch/um/Kconfig.$(HEADER_ARCH)

archprepare: $(SHARED_HEADERS)/user_constants.h
archprepare: $(SHARED_HEADERS)/kern_constants.h
archprepare: $(ARCH_DIR)/include/shared/user_constants.h
prepare: $(ARCH_DIR)/include/shared/kern_constants.h

LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib
Expand Down Expand Up @@ -120,13 +119,17 @@ endef
# When cleaning we don't include .config, so we don't include
# TT or skas makefiles and don't clean skas_ptregs.h.
CLEAN_FILES += linux x.i gmon.out \
$(SHARED_HEADERS)/user_constants.h \
$(SHARED_HEADERS)/kern_constants.h
$(ARCH_DIR)/include/shared/user_constants.h \
$(ARCH_DIR)/include/shared/kern_constants.h

archclean:
@find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
-o -name '*.gcov' \) -type f -print | xargs rm -f

$(objtree)/$(ARCH_DIR)/include/shared:
@echo ' MKDIR $@'
$(Q)mkdir -p $@

# Generated files

$(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s: FORCE
Expand All @@ -145,11 +148,11 @@ define filechk_gen-asm-offsets
echo ""; )
endef

$(SHARED_HEADERS)/user_constants.h: $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s
$(ARCH_DIR)/include/shared/user_constants.h: $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s
$(call filechk,gen-asm-offsets)

$(SHARED_HEADERS)/kern_constants.h:
$(Q)mkdir -p $(dir $@)
$(Q)echo '#include "../../../../include/asm/asm-offsets.h"' >$@
$(ARCH_DIR)/include/shared/kern_constants.h: $(objtree)/$(ARCH_DIR)/include/shared
@echo ' SYMLINK $@'
$(Q)ln -sf ../../../../include/asm/asm-offsets.h $@

export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH
14 changes: 7 additions & 7 deletions trunk/arch/um/include/asm/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ extern int get_signals(void);
extern void block_signals(void);
extern void unblock_signals(void);

#define local_save_flags(flags) do { typecheck(unsigned long, flags); \
#define raw_local_save_flags(flags) do { typecheck(unsigned long, flags); \
(flags) = get_signals(); } while(0)
#define local_irq_restore(flags) do { typecheck(unsigned long, flags); \
#define raw_local_irq_restore(flags) do { typecheck(unsigned long, flags); \
set_signals(flags); } while(0)

#define local_irq_save(flags) do { local_save_flags(flags); \
local_irq_disable(); } while(0)
#define raw_local_irq_save(flags) do { raw_local_save_flags(flags); \
raw_local_irq_disable(); } while(0)

#define local_irq_enable() unblock_signals()
#define local_irq_disable() block_signals()
#define raw_local_irq_enable() unblock_signals()
#define raw_local_irq_disable() block_signals()

#define irqs_disabled() \
({ \
unsigned long flags; \
local_save_flags(flags); \
raw_local_save_flags(flags); \
(flags == 0); \
})

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/Kconfig.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ config X86_MINIMUM_CPU_FAMILY

config X86_DEBUGCTLMSR
def_bool y
depends on !(MK6 || MWINCHIPC6 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486 || M386) && !UML
depends on !(MK6 || MWINCHIPC6 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486 || M386)

menuconfig PROCESSOR_SELECT
bool "Supported processor vendors" if EMBEDDED
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/infiniband/hw/ipath/ipath_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ static int ipathfs_mknod(struct inode *dir, struct dentry *dentry,
}

inode->i_mode = mode;
inode->i_uid = 0;
inode->i_gid = 0;
inode->i_blocks = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
inode->i_private = data;
if ((mode & S_IFMT) == S_IFDIR) {
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/isdn/capi/capifs.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ capifs_fill_super(struct super_block *s, void *data, int silent)
goto fail;
inode->i_ino = 1;
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
inode->i_blocks = 0;
inode->i_uid = inode->i_gid = 0;
inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR;
inode->i_op = &simple_dir_inode_operations;
inode->i_fop = &simple_dir_operations;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/message/i2o/exec-osm.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI>
* Deepak Saxena <deepak@plexity.net>
* Boji T Kannanthanam <boji.t.kannanthanam@intel.com>
* Alan Cox <alan@lxorguk.ukuu.org.uk>:
* Alan Cox <alan@redhat.com>:
* Ported to Linux 2.5.
* Markus Lidel <Markus.Lidel@shadowconnect.com>:
* Minor fixes for 2.6.
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/message/i2o/i2o_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Changed ioctl_swdl(), implemented ioctl_swul() and ioctl_swdel()
* Deepak Saxena (11/18/1999):
* Added event managmenet support
* Alan Cox <alan@lxorguk.ukuu.org.uk>:
* Alan Cox <alan@redhat.com>:
* 2.4 rewrite ported to 2.5
* Markus Lidel <Markus.Lidel@shadowconnect.com>:
* Added pass-thru support for Adaptec's raidutils
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/message/i2o/iop.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI>
* Deepak Saxena <deepak@plexity.net>
* Boji T Kannanthanam <boji.t.kannanthanam@intel.com>
* Alan Cox <alan@lxorguk.ukuu.org.uk>:
* Alan Cox <alan@redhat.com>:
* Ported to Linux 2.5.
* Markus Lidel <Markus.Lidel@shadowconnect.com>:
* Minor fixes for 2.6.
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/message/i2o/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI>
* Deepak Saxena <deepak@plexity.net>
* Boji T Kannanthanam <boji.t.kannanthanam@intel.com>
* Alan Cox <alan@lxorguk.ukuu.org.uk>:
* Alan Cox <alan@redhat.com>:
* Ported to Linux 2.5.
* Markus Lidel <Markus.Lidel@shadowconnect.com>:
* Minor fixes for 2.6.
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/misc/ibmasm/ibmasmfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode)

if (ret) {
ret->i_mode = mode;
ret->i_uid = ret->i_gid = 0;
ret->i_blocks = 0;
ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME;
}
return ret;
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/oprofile/oprofilefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ static struct inode *oprofilefs_get_inode(struct super_block *sb, int mode)

if (inode) {
inode->i_mode = mode;
inode->i_uid = 0;
inode->i_gid = 0;
inode->i_blocks = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
}
return inode;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/usb/core/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ static struct inode *usbfs_get_inode (struct super_block *sb, int mode, dev_t de
inode->i_mode = mode;
inode->i_uid = current_fsuid();
inode->i_gid = current_fsgid();
inode->i_blocks = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
switch (mode & S_IFMT) {
default:
Expand Down
18 changes: 17 additions & 1 deletion trunk/drivers/usb/gadget/file_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -1863,10 +1863,26 @@ static int do_write(struct fsg_dev *fsg)
static int fsync_sub(struct lun *curlun)
{
struct file *filp = curlun->filp;
struct inode *inode;
int rc, err;

if (curlun->ro || !filp)
return 0;
return vfs_fsync(filp, filp->f_path.dentry, 1);
if (!filp->f_op->fsync)
return -EINVAL;

inode = filp->f_path.dentry->d_inode;
mutex_lock(&inode->i_mutex);
rc = filemap_fdatawrite(inode->i_mapping);
err = filp->f_op->fsync(filp, filp->f_path.dentry, 1);
if (!rc)
rc = err;
err = filemap_fdatawait(inode->i_mapping);
if (!rc)
rc = err;
mutex_unlock(&inode->i_mutex);
VLDBG(curlun, "fdatasync -> %d\n", rc);
return rc;
}

static void fsync_all(struct fsg_dev *fsg)
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/usb/gadget/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2001,6 +2001,7 @@ gadgetfs_make_inode (struct super_block *sb,
inode->i_mode = mode;
inode->i_uid = default_uid;
inode->i_gid = default_gid;
inode->i_blocks = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime
= CURRENT_TIME;
inode->i_private = data;
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/affs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ struct inode *affs_iget(struct super_block *sb, unsigned long ino)
goto bad_inode;
#else
inode->i_mode |= S_IFDIR;
/* ... and leave ->i_op and ->i_fop pointing to empty */
inode->i_op = NULL;
inode->i_fop = NULL;
break;
#endif
case ST_LINKFILE:
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/autofs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,13 @@ struct inode *autofs_iget(struct super_block *sb, unsigned long ino)
inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO;
inode->i_nlink = 2;
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
inode->i_blocks = 0;

if (ino == AUTOFS_ROOT_INO) {
inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR;
inode->i_op = &autofs_root_inode_operations;
inode->i_fop = &autofs_root_operations;
inode->i_uid = inode->i_gid = 0; /* Changed in read_super */
goto done;
}

Expand Down
4 changes: 4 additions & 0 deletions trunk/fs/autofs4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,11 @@ struct inode *autofs4_get_inode(struct super_block *sb,
if (sb->s_root) {
inode->i_uid = sb->s_root->d_inode->i_uid;
inode->i_gid = sb->s_root->d_inode->i_gid;
} else {
inode->i_uid = 0;
inode->i_gid = 0;
}
inode->i_blocks = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;

if (S_ISDIR(inf->mode)) {
Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/binfmt_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,9 @@ static struct inode *bm_get_inode(struct super_block *sb, int mode)

if (inode) {
inode->i_mode = mode;
inode->i_uid = 0;
inode->i_gid = 0;
inode->i_blocks = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime =
current_fs_time(inode->i_sb);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1641,7 +1641,7 @@ static int cifs_vmtruncate(struct inode *inode, loff_t offset)
i_size_write(inode, offset);
spin_unlock(&inode->i_lock);
out_truncate:
if (inode->i_op->truncate)
if (inode->i_op && inode->i_op->truncate)
inode->i_op->truncate(inode);
return 0;
out_sig:
Expand Down
12 changes: 10 additions & 2 deletions trunk/fs/coda/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ int coda_release(struct inode *coda_inode, struct file *coda_file)
int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, int datasync)
{
struct file *host_file;
struct inode *coda_inode = coda_dentry->d_inode;
struct dentry *host_dentry;
struct inode *host_inode, *coda_inode = coda_dentry->d_inode;
struct coda_file_info *cfi;
int err = 0;

Expand All @@ -213,7 +214,14 @@ int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, int datasync)
BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC);
host_file = cfi->cfi_container;

err = vfs_fsync(host_file, host_file->f_path.dentry, datasync);
if (host_file->f_op && host_file->f_op->fsync) {
host_dentry = host_file->f_path.dentry;
host_inode = host_dentry->d_inode;
mutex_lock(&host_inode->i_mutex);
err = host_file->f_op->fsync(host_file, host_dentry, datasync);
mutex_unlock(&host_inode->i_mutex);
}

if ( !err && !datasync ) {
lock_kernel();
err = venus_fsync(coda_inode->i_sb, coda_i2f(coda_inode));
Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/configfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ int configfs_setattr(struct dentry * dentry, struct iattr * iattr)
static inline void set_default_inode_attr(struct inode * inode, mode_t mode)
{
inode->i_mode = mode;
inode->i_uid = 0;
inode->i_gid = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
}

Expand All @@ -134,6 +136,7 @@ struct inode * configfs_new_inode(mode_t mode, struct configfs_dirent * sd)
{
struct inode * inode = new_inode(configfs_sb);
if (inode) {
inode->i_blocks = 0;
inode->i_mapping->a_ops = &configfs_aops;
inode->i_mapping->backing_dev_info = &configfs_backing_dev_info;
inode->i_op = &configfs_inode_operations;
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/cramfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ static struct inode *get_cramfs_inode(struct super_block *sb,
inode->i_op = &page_symlink_inode_operations;
inode->i_data.a_ops = &cramfs_aops;
} else {
inode->i_size = 0;
inode->i_blocks = 0;
init_special_inode(inode, inode->i_mode,
old_decode_dev(cramfs_inode->size));
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/debugfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ static struct inode *debugfs_get_inode(struct super_block *sb, int mode, dev_t d

if (inode) {
inode->i_mode = mode;
inode->i_uid = 0;
inode->i_gid = 0;
inode->i_blocks = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
switch (mode & S_IFMT) {
default:
Expand Down
4 changes: 4 additions & 0 deletions trunk/fs/devpts/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ static int mknod_ptmx(struct super_block *sb)
}

inode->i_ino = 2;
inode->i_uid = inode->i_gid = 0;
inode->i_blocks = 0;
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;

mode = S_IFCHR|opts->ptmxmode;
Expand Down Expand Up @@ -298,6 +300,8 @@ devpts_fill_super(struct super_block *s, void *data, int silent)
goto free_fsi;
inode->i_ino = 1;
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
inode->i_blocks = 0;
inode->i_uid = inode->i_gid = 0;
inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR;
inode->i_op = &simple_dir_inode_operations;
inode->i_fop = &simple_dir_operations;
Expand Down
15 changes: 12 additions & 3 deletions trunk/fs/ecryptfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,18 @@ static int ecryptfs_release(struct inode *inode, struct file *file)
static int
ecryptfs_fsync(struct file *file, struct dentry *dentry, int datasync)
{
return vfs_fsync(ecryptfs_file_to_lower(file),
ecryptfs_dentry_to_lower(dentry),
datasync);
struct file *lower_file = ecryptfs_file_to_lower(file);
struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry);
struct inode *lower_inode = lower_dentry->d_inode;
int rc = -EINVAL;

if (lower_inode->i_fop->fsync) {
mutex_lock(&lower_inode->i_mutex);
rc = lower_inode->i_fop->fsync(lower_file, lower_dentry,
datasync);
mutex_unlock(&lower_inode->i_mutex);
}
return rc;
}

static int ecryptfs_fasync(int fd, struct file *file, int flag)
Expand Down
Loading

0 comments on commit 5aedc94

Please sign in to comment.